Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance: Faster ascii overmap drawing
* Makes overmap drawing faster when using ascii overmap view, by doing less work in each step of the x/y loop. * On my (crappy) machine, each keypress to scroll the view when viewing the overmap had a ~100ms latency, making it all feel slow. With this commit, there is no noticeable latency for each keypress. A callgrind trace when scrolling the view showed that the latency was caused by time spent in `draw_window`. Specifically: * Reading an option for each cell, which causes hashtable lookups. In this commit, the option is instead now only read once before the x/y loop. * Drawing many black rectangles. In this commit, we skip each rect draw if the cell background is already black, since the whole drawing area should have already been cleared ealier in this call anyway.
- Loading branch information