On Thu, Apr 25, 2013 at 7:29 AM, Spencer Kohan <spencerko...@gmail.com>wrote:
> I'm attempting to use JavaScriptCore in a real-time application, and I'm > running into long pauses for garbage collection as memory usage increases. > I've been digging into the GC implementation in an effort to improve > performance, and I've noticed some references to the compiler directive > 'PARALLEL_GC' throughout the code, which makes me wonder if there's already > support for multi-threaded GC, and if so how to enable it. > JavaScriptCore uses a parallel Garbage Collector, but it is not concurrent with the main thread. When the engines requires to collect memory, the main thread stop and start the garbage collection. If the space is large enough to justify spawning threads, the garbage collection happens on as many core as needed to minimize the collection time. At the moment, the parallel GC is enabled on Mac OS X, iOS, GTK and Blackberry. If you are not using the latest version of WebKit trunk, I suggest you to update and try again. The garbage collector has improved lately, pause times have been reduced a lot. If you still see long pauses with the latest WebKit, it would be worth looking at the JavaScript code to find if something causes memory trashing. Benjamin
_______________________________________________ webkit-help mailing list webkit-help@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-help