google / dart-gl

OpenGL ES 2.0 Dart Native Extension
BSD 3-Clause "New" or "Revised" License
91 stars 17 forks source link

How good is the performance #20

Closed orklann closed 7 years ago

orklann commented 7 years ago

Hi, @jtmcdole, thanks for your comments on my issues.

And How good is the performance of this native extension? Do you have any benchmark on this library yet?

jtmcdole commented 7 years ago

Depends on complexity and what you're doing. We get 60fps on embedded devices for UIs without much optimization. Eventually we might want to make a batch function which records the API calls and sends them over over the native interface one time per frame (there is a small cost for each native interface call) - but we don't need to do that now.

This is very much a raw driver. Writing an application directly to it might be overkill. You'll want something like a scenegraph on top to make it easier.

Lastly, you can enable tracing if you compile the dll. This lets you ask the DartVM for traces that you can feed into Chrome's chrome://tracing for a very detailed report of what you're doing and how long it is taking.