-
Notifications
You must be signed in to change notification settings - Fork 100
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
Severe performance degradation relative to three.js #142
Comments
Ugh, I should qualify this a bit more. Seems some demos are broken, some work perfectly fine. I have noticed that recently, with dual screen on linux, webgl slows down when chrome is full sized on one screen. Shrinking the window slightly fixes it, and for the demos that don't appear to be broken, three.dart is very fast. |
I've notices the same behavior with three.js on dual monitor setups with chrome in Linux. |
The problem, at least from what I can tell, is ONLY a problem with JavaScript. I assume you are using the compiled code from Dart to JavaScript on the demos instead of running them through Dart because you said Chrome not Dartium. For example, after profiling each section of code, the Dart code takes 5x more time for: multiplying matrices, setting matrix3f uniforms, and for setting matrix4f uniforms. I'll get back to you when I test the code in Dartium, but until then, know that Dart2JS isn't a fair comparison. |
This might be a good bug for dart2js: if you can create a small repro Dart program that runs very slow when compiled to JS, please add it to a new issue here: dartbug.com/new |
Here's what I've experienced:
The above is only from memory after playing with it for a few minutes, so I could have my data mixed up. My program is a 50x50 hex grid with two basic shaders. It's currently ~200 SLOC, but I think I can reduce it a bit. I'll try to post a live demo so both the three.dart team and dart2js team can take a look. |
Do you happen to know what version of chromium dartium is based on? Last time I saw I believe chromium was version 39 and dartium was 37. Do you know if the program is bottlenecked on the CPU or the GPU? |
The ported demos in three.dart are a lot slower compared to three.js, with much more latency, stuttering, and lower framerate
The text was updated successfully, but these errors were encountered: