canvas
canvas copied to clipboard
Typical performance using webgl with this plugin.
I made a simple bunny-mark test using WebGL API, ran the app on an iPhone X, and only got stable 60fps at ~800-900 bunnies.
The same source code can easily run 60fps on safari with more than 10000 bunnies.
Is that the typical performance we can get? Or am I doing something wrong?
My example is using an in-house rendering engine. It can be the problem. But did anyone run pixijs bunny-mark using this plugin?
Thanks for this , I have a couple ideas on how performance can be improved .
It's probably the individual draw calls that come with a lot of overhead. I found shaders alone to run well, so the issue probably lies on the javascript side. Have you profiled it?
It's probably the individual draw calls that come with a lot of overhead. I found shaders alone to run well, so the issue probably lies on the javascript side. Have you profiled it?
I profiled it when running on the web. Almost no JS overhead. No GC stuttering (everything is initialized at load time).
The draw call is batched and use drawElements on indexed vertices.
I'm new to NativeScript so maybe I will learn how to profile directly on the app to see the difference.
But I suspect that the reason has something to do with how the call is bridged.
Or is there a dev/production switch that I need to turn?
I'll check out that demo 🙂
You can profile directly using Xcode or Android Studio, just open the project in the respective editor.
that bridge 😁
I increased my batch size to 10920 vertices, safari could spawn 60000 bunnies at 60fps. This plugin got to 1200 bunnies.
I tried running on ejecta, I could get 4000 bunnies before the frame drops.
@implicit-invocation can you try again 😄
@implicit-invocation can you try again 😄
OK, I will try again tomorrow.
android😁android😁android😁android😁android😁android😁android😁android😁android😁android😁android😁android😁
Performance has been improved in v2