-
-
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
Long time spent in _edgesToVertices
when assembling shapes into composite models
#7237
Comments
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! |
Two points here: For why stuff without strokes ends up spending time on stroke calculations anyway: it looks like when we draw a model, we generate strokes around every triangle if we have no stroke info: I suspect this was so that something like For why it has to recalculate anything when combining shapes: I think we could be adding calculated edge data like If anyone's interested in taking on any of these tasks before I get to them, let me know, I'm happy to help review! |
Most appropriate sub-area of p5.js?
p5.js version
v1.10.0
Web browser and version
Firefox 128.0.3, Chrome 128.0.6613.84
Operating system
Any
Steps to reproduce this
I am assembling my "world" into geometry, updating it whenever the world changes. Since updates are very rare, this should give me a nice boost in performance. I noticed that whenever the world does change, and I have to refresh the prebuilt geometry, a lot of time is spent in
_edgesToVertices
(up to 88% when first drawing the new geometry). While it does make sense to me that high-fidelity strokes cost performance and need this step, I do not see why it needs to go through this step in the first place, given that I assemble my geometry from primitives that already should have, or should have cached, their strokes.EDIT: The above is compounded by the fact that this step is apparently done even when I explicitly render the model with
noStroke()
(during[begin|end]Geometry
and when rendering withmodel(..)
) meaning I can not find a way to work around this post processing step.Steps:
Snippet:
The text was updated successfully, but these errors were encountered: