You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
I'm not able to replicate the exact behaviour you described with the frame rate increasing to 60 fps on clicking the canvas on my Mac with Safari. The frame rate in general is a bit variable between different machines and browsers I use between 10 to 30 fps but that is expected with 100,000 draw calls in a frame.
I don't know why you are seeing the change in framerate on click but likely is due to some resource optimization on the browser. If you want to render a lot of points, it is probably more efficient to edit the pixels array and updatePixels() afterward rather than making individual draw calls.
I know about going directly to the pixels array but the fact is that for such a trivial sketch having to click to get to the full 60fps or so is bewildering. I will run the sketch on different browsers on the Mac just to see if it makes a difference. The bottom line is that I’d expect the sketch to run at full fps without requiring any intervention from the user (like on a wall-mounted smart display in a public place)
@fabiopettinati It sounds like, as Ken suggested, Safari is deciding to optimize for efficiency until it's sure the user actually wants more power allocated to it by interacting with the page. That's largely out of p5's control, if that's the case.
Is this different on battery vs when plugged in? Some performance things are pretty throttled on battery for the reasons above.
Most appropriate sub-area of p5.js?
p5.js version
1.11.1 same behavior in older versions as well.
Web browser and version
Safari 18.2
Operating system
MacOS 15.2
Steps to reproduce this
Steps:
Snippet:
The text was updated successfully, but these errors were encountered: