WEBGL became extremely slow since p5.js version 1.0.0
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build Process
- Unit Testing
- Internalization
- Friendly Errors
- Other (specify if possible)
p5.js version
No response
Web browser and version
No response
Operating System
No response
Steps to reproduce this
Steps:
- Create a speed test using WEBGL, for example here I created random triangles moving around: https://editor.p5js.org/shangtsung/sketches/qMZ_4M4c6
- You can see that the shapes move around really slow, the whole browser window becomes very slow. Until I remove the 'WEBGL' from createCanvas(800, 600, WEBGL), then everything moves very fast.
- Also everything moves very fast (including when WEBGL is included) in older p5.js versions before 1.0.0.
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked p5.js WebGL sketch and comparing its performance with versions before and after 1.0.0, focusing on the createCanvas(800, 600, WEBGL) entry point. A useful result would reproduce the slowdown, identify the regression in the rendering path, and verify comparable movement speed in the latest version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100