A background thread performs work independently of the primary interface thread. Keeping expensive work away from the main thread helps the interface remain responsive during scrolling, input, and rendering. section 7.3.1
Use background threads for data processing, network-response handling, image decoding, storage, and other CPU- or I/O-heavy tasks. Keep drawing and arranging interface elements on the main thread, then return results for display. A profiler exposes the boundary: if application calculations run on the main thread during scrolling, move them off it. section 7.3.1 section 1.3.1
Image decoding during scrolling
An application that decodes images while the user scrolls can spend 1.4 seconds on work that blocks interface progress. Profile activity by thread, locate the decoding call, move decoding to a background thread, and keep only the resulting display update on the main thread. section 7.3.1
Figure 7.5 An example call tree showing where time is spent. The top rows are system code you cannot change. Keep expanding until you reach your own functions at the bottom, which is where you focus your attention to improve performance.

Expand the call tree from system code to application functions, then use thread placement to identify work that should leave the main thread. section 7.3.1
















