Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Optimize drawing: Merge layers to reduce memory usage #215
With tiling implemented, the main consumer of memory are the large number of layers. One way to help is to merge two or more layers into a single layer.
Two layers that can almost certainly be merged are the grid line layer and the star point layer. These draw static board features that never change unless the user starts a new game with a different board size.
The two cross-hair layers cannot be merged with each other because
Instead, an attempt should be made to
Before committing this, a performance measurement should be made using the Core Animation instrument.