Dart VM and GC

1,037 views
Skip to first unread message

Si Robertson

unread,
Jul 14, 2014, 7:18:13 AM7/14/14
to mi...@dartlang.org
Hi guys,

I'm curious to know how GC is being handled in the Dart VM. Does it run in its own thread or reserve a small amount of frame time for itself, or will the pain of unpredictable runtime pauses plague us like it does in many other languages (JavaScript, ActionScript, etc)?

I haven't pushed the VM hard enough yet to be able to answer this question for myself :-)

Bob Nystrom

unread,
Jul 14, 2014, 12:00:43 PM7/14/14
to General Dart Discussion
You might get a better answer to this on the vm-...@dartlang.org list. The VM guys are often too busy speaking in x86 machine code to read this list, but they follow vm-dev pretty closely.

Cheers!

- bob



--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Ivan Posva

unread,
Jul 14, 2014, 4:45:03 PM7/14/14
to General Dart Discussion
Si,

Thanks for your interest in the Dart VM implementation details.
Currently we implement a relatively simple garbage collection
algorithm. Our approach is as follows: The VM and its garbage
collection mechanism should not be in a Dart developer's way.
Essentially, we are trying to get to a point where you should not care
how the garbage collection is implemented and whether implementation
details change over time.

Initially we focused on a stable implementation, so if you push the VM
hard enough you will occasionally experience departure into unfriendly
territory. Addressing this is on our task list for the next months. We
will have to balance low latency (small pauses), high throughput, low
memory usage and low CPU consumption against each other. Some of this
will be work exclusively in the VM, while other areas we will have to
work with the Dart bindings layer in Chromium.

Hope this helps,
-Ivan

Cogman

unread,
Jul 14, 2014, 6:04:20 PM7/14/14
to mi...@dartlang.org
@Ivan

How are you guys planning on handling oilpan?  Is there going to be a standalone GC for dart vm outside of chrome but swapped with oilpan in chrome?

Si Robertson

unread,
Jul 14, 2014, 11:28:02 PM7/14/14
to mi...@dartlang.org
If it's possible, the best thing the Dart VM could do for programmers is to reserve ~2ms of time (per frame) for itself and run GC within than reserved time. That may lead to additional memory usage occasionally but that's a price most programmers would be willing to pay, I imagine. Random runtime freezes would no longer be a problem that's for sure :-)

George Moschovitis

unread,
Jul 16, 2014, 2:01:02 PM7/16/14
to mi...@dartlang.org
Are you planning separate client and server VMs a-la JDK?

On Monday, July 14, 2014 11:45:03 PM UTC+3, Ivan Posva wrote:
Si,

Thanks for your interest in the Dart VM implementation details.
Currently we implement a relatively simple garbage collection ...

Srdjan Mitrovic

unread,
Jul 16, 2014, 2:26:12 PM7/16/14
to General Dart Discussion
On Wed, Jul 16, 2014 at 11:01 AM, George Moschovitis <george.mo...@gmail.com> wrote:
Are you planning separate client and server VMs a-la JDK?

Ideally one Dart VM would be suited well both for server and client apps. We may use different server/client arguments for GC and compiler optimizations (e.g., spend more time optimizing, generate faster code), but no concrete plans have been formulated yet.

Cheers,

- Srdjan
 

On Monday, July 14, 2014 11:45:03 PM UTC+3, Ivan Posva wrote:
Si,

Thanks for your interest in the Dart VM implementation details.
Currently we implement a relatively simple garbage collection ...

--
Reply all
Reply to author
Forward
0 new messages