-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WEBGL became extremely slow since p5.js version 1.0.0 #6438
Comments
I'll reply with some more suggestions later, but for some context, see this related issue: #6407 |
Ok here's some more detailed info! I think the two changes that are affecting your benchmark are:
|
Thanks for your reply. |
For what it's worth, on a 2015 Intel Macbook Pro in Chrome, I get the following frame rates:
I'm not sure why the Chrome one has such a low frame rate for me on the old p5 version, but it is consistent across my tests. All that to say, |
Interesting. I am using 2017 Surface Pro, Windows 10. Checked on latest versions of Chrome and Firefox. |
If you have the time, if you use your browser's profiler to record a second or two of the sketch running, export the profile as JSON and attach it to a comment, I can take a look and see if anything stands out as abnormal or the cause of the slowdown. |
For sure. Here you are, here it is on Chrome, Surface Pro: However, I just checked on Edge, and it is performing fast there! No matter if I'm using beginShape(TRIANGLES) or just beginShape() it is working fast just fine. Also I checked on mobile (iPhone XR) on all browsers (Chrome, Safari, Firefox) and I saw that it is working FAST on that device too! Also doesn't matter whether I'm using beginShape(TRIANGLES) or just beginShape() So what is wrong with Chrome and Firefox on Surface Pro? Or what is wrong with p5.js? On older versions of p5.js (before 1.0.0) it had fast performance. |
setAttributes({ antialias: false }) did not make a difference. And here is the output from chrome://tracing (clicked Record, then visited the sketch and clicked Play for a couple of seconds, and then stopped the recording): I hope that helps(?) |
Yes, I have tested three versions prior to version 1.0.0, and the same thing is running fast on those versions (on the same computer and browsers). |
Here is something that might help. And it is very slow on every newer version starting from version 1.0.0, no matter what browser or device. It is slow even on iPhone! It is very fast on version 0.9.0 for example. I hope that can help resolve the issue. Otherwise we're just going to have to be stuck at using an old version like 0.9.0. |
Just to drop in a suggestion here if we are trying to narrow down where precisely performance drop starts, |
No, this did not make any difference.
I'm not using a minified p5.js in my sketch.
Yes, I have tested on v0.10.0 and v0.10.2 and they are also fast. Slowness starts from version 1.0.0. You can see for yourself, simply change the p5.js version in my sketch index.html and see how drastically the performance changes. |
Most appropriate sub-area of p5.js?
p5.js version
No response
Web browser and version
No response
Operating System
No response
Steps to reproduce this
Steps:
So something was messed up in p5.js since version 1.0.0 (including the latest version) that made it very slow.
Or am I missing something?
Probably I was missing this library?
https://github.com/davepagurek/p5.buildgeometry
It seems to make this too complicated. Should I switch back to the very old but fast p5.js version or how exactly should I edit my code to make it fast using the latest p5.js?
The text was updated successfully, but these errors were encountered: