-
Notifications
You must be signed in to change notification settings - Fork 75
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
Performance improvements #65
Comments
Amazing stuff. I’ve not really gotten that deep into the performance of the library yet, I knew there would be bottlenecks though so thank you for finding these. I will get to these this weekend. Can I ask for some screens / data from your dev tools investigations? Would love to see them. |
Sorry for the delay @FlorentMasson, working on this right now! Will hopefully have a branch up this weekend, would be great if you could help me benchmark a bit if you have some time. |
Sure, let me know when it's ready. |
@FlorentMasson see #68, would be great to see how the benchmarks look after these changes! |
@FlorentMasson I've created #71 to track this other improvement |
@FlorentMasson do you mind providing the test case you were looking at as well as how you're running the chrome performance profiler? I am not seeing as much of a granular view, are you running against unbuilt/minified code? |
Here is the emitter I have been using:
I had just rebuilt the minified version (with your build script) with my changes included and used it as is. But to see the granular view, you have to place the .map file in the same directory so that chrome devtools can decode it properly (or include the source instead) |
Have you been able to try out the changes in #68? I’ve got a bunch of other perf improvements coming including a |
Not specifically #68 but as it's very close to my suggested changes I've been using it for a while. It helped reduce the CPU overhead, but not the number of GPU draw calls. |
I’ve added a |
Wow, looks great! I hadn't seen it as it's in the develop branch. 2 caveats I encountered while using GL_POINTS (ie THREE.Points):
|
Yeah I only got it done recently, I'm about to do a big release which will also announce a fully featured GUI editor for making particle systems, so watch this space! Those are interesting points about THREE.Points 😉, I wasn't aware of them. I can't really see what your image here is illustrating though, maybe it's worthwhile to raise an issue over in the Three repo? On from this, if you wouldn't mind doing your previous perf benchmarks against #68 I would really appreciate it. If this does improve CPU perf I would like to merge it ASAP! |
@davidpox have you changed the depthTest and depthWrite values for your THREE.SpriteMaterial? |
@FlorentMasson |
@davidpox Thank you for testing it out! Okay so you aren't doing anything wrong here at all as far as system creation is going. It should be a drop in replacement for the Do you mind posting screens of swapping out the renderers so I can compare? |
@rohan-deshpande Sure : Might also be worth noting that spine-ts/threejs objects correctly appear in front of the particles on both renderers, like so: |
Okay yep, it's an issue, I will track this in a new issue and mention you there @davidpox thanks for reporting |
I've been doing some performance analysis with chrome dev tools because fps was pretty low for my usage.
(alternatively, could override the whole function in SpriteRenderer)
Could you fix these or do you need a PR @rohan-deshpande ?
The text was updated successfully, but these errors were encountered: