Use X-Rays to Get Deep Insights into Code

Our analysis let us significantly reduce the amount of code we need to consider. We started with an entire codebase and narrowed it down to a single file where improvements matter. For smaller files that’s enough information to start improving the code, but we need to do even better if we come across large hotspots.

Our main suspect in this case is a file with 2,500 lines of code. It’s a lot, for sure, but as we’ll see later in this book, hotspots with more than 10,000 lines of code are fairly common out in the wild. How useful would it be to know that a file with thousands of lines of code is a hotspot? Where do we look? How do we act on that information? The most common answer is that we don’t. We ...

Get Software Design X-Rays now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.