Efficient Canvas Drawing

You correctly forked the project :slight_smile:. I tried your code - I’m still seeing really slow scrolling when I enlarge the window to fill my 27" monitor. Performance (like with the arrow keys) is fine when the window is smaller. I could understand this if it was because I was drawing more tiles to the screen in a loop when the window is bigger but that’s not the case. The only difference between what is happening when the window is small and when it is large is that a larger picture is being drawn using Graphics.DrawPicture when the window is larger. There is no extra logic and there are no extra draw calls.

Can it really be that copying a larger picture takes 4 - 5 times longer?

@samRowlands: Welcome to the forum! I’m planning on sitting down this evening and working on this again. I have no doubt that you’re correct that using some of the underlying macOS technologies will be faster but I’m really trying to make this cross platform. I think you and I had a public discussion on the Xojo Inc forums a few years ago about this very problem and I am clearly too stubborn or too stupid to give up on this idea. I just find it unbelievable that the Canvas can’t handle what I’m trying to do.

I’d really appreciate if you take a look at the demo project in the repo @samRowlands. Can you see any obvious mistakes? The code is deliberately simple and well annotated. After all, I’m hoping to open source the mapping canvas when it’s done.