-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Use Dart's lightweight isolates between multiple engines #72025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Re-opening. Seems like isolate group re-use isn't working on Android. |
Trying on iOS on https://github.com/gaaclarke/DoubleEngine with the engine on master head doesn't seem to be triggering https://github.com/flutter/engine/blob/ce14c8a8414214b0afc3e4c9bec8d6538bf72323/runtime/dart_isolate.cc#L278 instead of https://github.com/flutter/engine/blob/ce14c8a8414214b0afc3e4c9bec8d6538bf72323/runtime/dart_isolate.cc#L265 as well. Maybe we're missing a flag? https://cs.opensource.google/search?q=%22--enable_isolate_groups%22&sq=&ss=flutter. This could plausibly explain our memory discrepancy with the prototype. |
(mentioned offline in a chat) This is the conditional that determines if we are using CreateIsolateInGroup: https://github.com/flutter/engine/blob/0317e389fc07a98bd01775c42f410b6980dfe50e/runtime/dart_isolate.cc#L259 I'd print that out that conditional. We have unit tests that are asserting that CreateIsolateInGroup is being used when possible. |
Verified on memory. This fix is correct! The memory overhead per engine is just 180kB now \o/ |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Let the APIs built from dart-lang/sdk#36097 be used to create lightweight isolates in engines of the same FlutterEngineGroup on Android and iOS.
If JIT execution isn't ready, make sure to have a graceful fallback.
The text was updated successfully, but these errors were encountered: