summaryrefslogtreecommitdiff
path: root/docs/landscape_grid.html
diff options
context:
space:
mode:
authorJindrich Makovicka <makovick@gmail.com>2018-09-16 18:26:04 +0200
committerMichael Lutz <michi@icosahedron.de>2018-10-26 20:22:38 +0200
commit25ab9c1997f770f4a8a66bb3ad4b82ba87e3a977 (patch)
treeba3950e5d5d9994ff3763ec65d121254bb5b37cc /docs/landscape_grid.html
parent47ff673664a14e250bf01af6f29c65abb1e0975e (diff)
downloadopenttd-25ab9c1997f770f4a8a66bb3ad4b82ba87e3a977.tar.xz
Codechange: Improve (un)zoom performance
When zooming out with a high res display, there can be about 150k sprites to be sorted before displaying. With the O(n^2) complexity of the sprite sorter, this can take several seconds. This patch works around this by sorting the sprites by the xmin coordinate first using QSort, which later allows an early bailout out of the inner loop. This is enough to cut down the full unzoom time on a 4k display to a fraction of second.
Diffstat (limited to 'docs/landscape_grid.html')
0 files changed, 0 insertions, 0 deletions