Allow for isolates to share memory of immutable objects #49876
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
type-enhancement
A request for a change that isn't a bug
As far as I understand from the docs, a
SendPort
will copy the data being transmitted to theReceivePort
, whileIsolate.exit()
won't copy the data, just pass the object reference to the originalIsolate
, if both are on the same Isolate Group.I believe there might be a chance to improve the performance further. If we annotate a class with
@immutable
, in theory that object could be shared with multiple threads, so we could send it to anotherIsolate
without copying it.I imagine there might be other complications behind the scenes, but I wanted to suggest if there's a way for us to improve the performance for
Isolates
.I thinking about a use case for my trading app, where I need a separate Isolate to receive low latency, real time stock data, parse it into immutable objects, and send them to the main Isolate.
The text was updated successfully, but these errors were encountered: