drawImage Performance


im having a problem with p5 Performance.
Im building a UI tool that uses some p5 Images, the largest ones are around 1000x800px or so.

Normally the Performance is good and it looks like this in the profiler:

Sometimes when i leave the Page running, it slows down to around 5-10 FPS and the drawImage function refreshes very slowly:

When i resize the browser window or refresh the page this gets resolved immediatly and the page is running smoothly again.

Does anyone have an idea what might be causing this?

EDIT: I wanna add that this happens every time i leave it running for a while, it does not happen when i interact with the tool. So im imagining there might be some cumulative stuff going on that causes to stack up and slow down everything. Im just drawing the images ind draw() though i cant imagine whats causing this.

Here’s a little snipped form VSCode where i draw the images. (when commenting out the tint() i still have this problem.

many thanks,