Speed up Application

Hey Processing Forum!

Lately I’ve been working on a simple Photoshop clone in Processing - appropriately named PictureStore. One of its main features is importing a premade image and drawing overtop of it, but I’ve noticed that some large images slow down the canvas (A PGraphics object being drawn to the screen). Similarly, stacking several image layers on top of each other slows it down

This is where the main issue of this post comes into play - How would I go about speeding up the canvas rendering? Is there some optimization I could apply with the way it gets rendered? I’ve looked into using P2D, but P2D breaks most of my code (menubar, the need for distance fields, etc) - So before rewriting major parts of the code I wanted to check in here and see if there’s anything else I could do beforehand.

You can find the PictureStore source code here

Any advice is greatly appreciated, thanks in advance!

1 Like