Can you point me to the specific code that gets executed for every frame?

Are you sure the frame drops you're seeing are caused by GC? Running with
--trace-gc would tell you how much time is spent in GC pauses. Since the GC
does most of its work incrementally, most pauses should be very short (even
in a 60 fps app -- that's pretty much what the GC is optimized for).
Another possible source of pauses is compilation, --trace-opt would
indicate that.

If it is indeed GC activity, can you figure out what kind of objects are
being created and subsequently garbage collected? In many cases, it's
possible to write JS code such that it doesn't produce a lot of garbage.

Maybe someone else on this list has additional tips; I don't have personal
experience embedding V8.


On Sat, Oct 18, 2014 at 7:50 PM, Sebastian Herrlinger <[email protected]>
wrote:

> Using the latest master branch of v8 I am trying to bring some scripting
> together with http://libcinder.org/ in an Cocoa App.
> Works fine so far and I can happily draw from javascript and control
> component behaviour.
>
> As the cinder app runs at 60 fps, the GL methods bindings get called very
> often, which apparently creates a lot of garbage to collect.
> The frame rate drops up to 20 fps when the garbage collection kicks in. I
> initialise v8 in the main thread together with Cinder.
>
> Is there a design concept that lets me optimise this GC behaviour to work
> around frame rate drops?
> Using multiple contexts and switching for example? Has anybody experience
> with Javascript and render loops?
>
> Best regards,
>
> Sebastian
>
>
> PS: Stitched together Cinder + v8 here:
> https://github.com/kommander/cinderjs
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to