Will transferabel arrays get a feature for isolates on server and on the client?

108 views
Skip to first unread message

Peter Jakobs

unread,
Mar 14, 2013, 7:49:04 AM3/14/13
to mi...@dartlang.org
Having lightning fast messaging from isolate to isolate is really important apps that run hat run on 60Hz. The fastes way on workers is sending array buffers.
Could we get that on isolates as well, on the standalone dartVM and dartium?

Ladislav Thon

unread,
Mar 14, 2013, 7:53:35 AM3/14/13
to mi...@dartlang.org
Having lightning fast messaging from isolate to isolate is really important apps that run hat run on 60Hz. The fastes way on workers is sending array buffers.
Could we get that on isolates as well, on the standalone dartVM and dartium?

This was already asked several times... and I think that we didn't get any satisfying answer. I'd love to know as well. Actually, I think that we haven't heard much about isolates plans in general, even though I consider them one of the major features of Dart.

I'd be grateful for any deeper insight from the Dart team. Thanks!

LT

Peter Jakobs

unread,
Mar 14, 2013, 7:56:23 AM3/14/13
to mi...@dartlang.org


Am Donnerstag, 14. März 2013 12:53:35 UTC+1 schrieb Ladislav Thon:


This was already asked several times... and I think that we didn't get any satisfying answer. I'd love to know as well. Actually, I think that we haven't heard much about isolates plans in general, even though I consider them one of the major features of Dart.

Yes I know, but with the new with the new unified library for TypedArrays I thought its the right time to ask again.

Cheers

Peter 

Ladislav Thon

unread,
Mar 14, 2013, 8:45:54 AM3/14/13
to mi...@dartlang.org
This was already asked several times... and I think that we didn't get any satisfying answer. I'd love to know as well. Actually, I think that we haven't heard much about isolates plans in general, even though I consider them one of the major features of Dart.

Yes I know, but with the new with the new unified library for TypedArrays I thought its the right time to ask again.

I don't think that introducing typeddata changed something, it's just unified interface for Dart VM and dart2js. The VM still maintains separate heaps for isolates, which is very much against the idea of transferables.

LT

Peter Jakobs

unread,
Mar 14, 2013, 9:02:57 AM3/14/13
to mi...@dartlang.org
Ladislav, if they work like this, does Arraybuffers on webworkers with dart are actually transferable in Dartium?

Ladislav Thon

unread,
Mar 14, 2013, 9:08:57 AM3/14/13
to mi...@dartlang.org
Ladislav, if they work like this, does Arraybuffers on webworkers with dart are actually transferable in Dartium?

Good question. Since you are speaking about web workers, this doesn't really apply to Dart VM and therefore to Dartium, instead it applies to dart2js only. At least that's how I understand it. Any dart2js people here to answer?

LT

Peter Jakobs

unread,
Mar 14, 2013, 9:24:27 AM3/14/13
to mi...@dartlang.org
Workers have their separated heap (as far is I know) so that they can have GC calls without affecting other workers or the mainthread. Arraybuffers are allocated outside of the VM in webkit. But they want to change that so that V8 allocates them directly (because this is much faster).

Bob Nystrom

unread,
Mar 14, 2013, 12:17:12 PM3/14/13
to General Dart Discussion
Typed arrays get discussed pretty frequently on the team as far as I can tell. I think there's consensus that we need to do more work there. Ditto for isolates.

Don't hold me to this, but my impression is that the entire team is very focused on browser-side, UI-focused Dart right now, which means server-side Dart, isolates, web workers, etc. are (temporarily!) not getting a lot of attention from the team. As we head towards 1.0, I think our goal is to be able to build rich client-side user experiences in Dart. Since you can do that without isolates and typed arrays, they probably won't get too much attention until other parts of the Dart platform have matured.

Cheers,

- bob


On Thu, Mar 14, 2013 at 6:24 AM, Peter Jakobs <p4j...@gmail.com> wrote:
Workers have their separated heap (as far is I know) so that they can have GC calls without affecting other workers or the mainthread. Arraybuffers are allocated outside of the VM in webkit. But they want to change that so that V8 allocates them directly (because this is much faster).

--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 

Peter Jakobs

unread,
Mar 15, 2013, 6:23:27 AM3/15/13
to mi...@dartlang.org
So nothing changed since last summer. Thats a bit sad, so often one of the big selling points of dart was how fast it is but it still misses a fast solution for Isolates.
But anyways, I think I will build the communication between isolates with typed-arrays, as thats the only choice to transfer data, when compiled to js really fast. So in the end if isolate communication will be ever fast and want to have that fast communication consistent on javascript as well, it has to use transferable typed arrays... right?

-- Peter

Ladislav Thon

unread,
Mar 15, 2013, 6:29:48 AM3/15/13
to mi...@dartlang.org
So nothing changed since last summer. Thats a bit sad, so often one of the big selling points of dart was how fast it is but it still misses a fast solution for Isolates.
But anyways, I think I will build the communication between isolates with typed-arrays, as thats the only choice to transfer data, when compiled to js really fast. So in the end if isolate communication will be ever fast and want to have that fast communication consistent on javascript as well, it has to use transferable typed arrays... right?

Yesterday, I've seen this commit: https://code.google.com/p/dart/source/detail?r=20036 It refers to a Uint8List.transferable constructor, which sounds promising. I couldn't find it in the documentation, but it's probably just a matter of time.

LT

Peter Jakobs

unread,
Mar 15, 2013, 6:34:14 AM3/15/13
to mi...@dartlang.org


Am Freitag, 15. März 2013 11:29:48 UTC+1 schrieb Ladislav Thon:

Yesterday, I've seen this commit: https://code.google.com/p/dart/source/detail?r=20036 It refers to a Uint8List.transferable constructor, which sounds promising. I couldn't find it in the documentation, but it's probably just a matter of time.

LT

Thanks for the link Ladislav, that looks quite promising.


-- Peter

John McCutchan

unread,
Mar 18, 2013, 10:34:37 AM3/18/13
to General Dart Discussion
Peter,

I certainly hope that we can support copy-less sharing of array buffers between different isolates.

John


--
Consider asking HOWTO questions at Stack Overflow: http://stackoverflow.com/tags/dart
 
 



--
John McCutchan <jo...@johnmccutchan.com>
Reply all
Reply to author
Forward
0 new messages