spstreets / gtfs_manager

A GUI for viewing and editing GTFS data
MIT License
30 stars 3 forks source link

Improve speed of changing zoom levels #41

Closed maxwell8888 closed 2 years ago

maxwell8888 commented 2 years ago

Avoid recalculating paths every time zoom level changes. We will be able to use the same paths for drawing to bitmaps for caching and canvas for immediate mode. The problem is that for the bitmaps, each zoom level requires a bitmap with a different path width, so the bitmap needs to be recreated. This will avoid recalcuating the binning (though the binning relies on knowing the path width, we can just make bins using the max path width), but will still be too slow for continuous scrolling (before immediate mode kicks in). Could possibly have 10 or so cached bitmaps at different zoom levels to allow somewhat smooth scrolling.