From 7e108dc53d98a4e83ca82842a78402f94080e121 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Wed, 22 Sep 2021 08:39:35 +0000 Subject: [PATCH] [vm/concurrency] Add CHANGELOG.md entry for work on isolates Issue https://github.com/dart-lang/sdk/issues/46754 Issue https://github.com/dart-lang/sdk/issues/36097 TEST=ci Change-Id: Ic0b1ecf88790576ae1f31b6a003b2175b9af1c66 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213343 Commit-Queue: Martin Kustermann Reviewed-by: Kevin Moore --- CHANGELOG.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fee0ec76f02..199c8f7f0d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,10 +95,35 @@ #### Dart VM -- **Breaking Change** [#45451](https://github.com/dart-lang/sdk/issues/45451) : +- **Breaking Change** [#45451](https://github.com/dart-lang/sdk/issues/45451): Support for `dart-ext:`-style native extensions has been removed as previously announced. Use `dart:ffi` to bind to native libraries instead. +- **Breaking Change** [#46754](https://github.com/dart-lang/sdk/issues/46754): + Isolates spawned via the `Isolate.spawn()` API are now grouped, operate on the + same managed heap and can therefore share various VM-internal data structures. + + This leads to ~100x faster isolate startup latency, ~10-100x lower + per-isolate base memory overhead and ~8x faster inter-isolate communication. + + Making isolates operate on the same heap will also make them collaborate on + garbage collections, which changes performance characteristics for GC-heavy + applications that may - in rare cases - negatively affect pause times or + throughput. + +- Allow closures both in inter-isolate messages as well as as entrypoints in + `Isolate.spawn(, ...)` calls. Closures and their enclosing context + may need to be copied in this process. The enclosing context is - as with + normal messages - verified to only contain objects that are sendable. + + Note of caution: The Dart VM's current representation of enclosing variables + in closures can make closures hang on to more variables than strictly needed. + Using such closures in inter-isolate communication can therefore lead to + copying of larger transitive object graphs. If the extended transitive + closure includes objects that are illegal to send, the sending will fail. + See [#36983](https://github.com/dart-lang/sdk/issues/36983), which tracks this + existing memory leak issue. + #### Linter Updated the Linter to `1.12.0`, which includes changes that