Performance. Is there any way to make work faster?

Hi all.

I’m trying to study p5js and desided to rewrite some sketch from processing to p5js. Here it is - https://www.openprocessing.org/sketch/882019.

Original tutorial in processing is here - https://timrodenbroeker.de/processing-tutorial-kinetic-typography-1/

So, it works. But i am unpleasantly surprised by performance. May be I did something wrong or is there any way to make it faster?

1 Like

Have you tried measuring which part of the code is taking the most time?

1 Like

When I exclude cycle part, everything works fine.

1 Like

Now, I added fps counter and see, that copy() function slows down performance. I have a cycle with copy(), which copy 1 pixel and increasing cycles i have downgrade fps. 1 cycle - 60fps, 2 - 40, 4 - 20, 8 - 10. And it doesn’t depends of size of copy, only the fact itself.

1 Like