sexytopo
sexytopo copied to clipboard
Create a cache of the graph view bitmap for use when panning
At present a full redraw of the graph is always performed when panning the view. It should be possible via the following technique to simply move the already calculated image around the view rather than recalculating the full layout: https://stackoverflow.com/a/13550808
The way it works at the moment isn't very efficient but I'm not sure if drawing the entire survey to a bitmap is the best approach.
Presumably you'd redraw on changing zoom level or major editing changes. It could be a ginormous bitmap if you zoom in to max detail on a big survey. At the moment there is some calculation done so only things that are potentially onscreen get drawn.
Caching the survey image might be the way forward but needs some thought.
Yes this approach would work for panning and panning only. Depends whether that specific area of the app has been sluggish enough to warrant such a targeted fix - I haven't used it enough to know yet