-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Improve FileSystemTransport
by using compute()
or background isolates
#536
Comments
makes sense, since Flutter Apps don't crash if not on the Native layer, we could offload the heavy work on a different Isolate using |
Even if it's not awaited it's still running on the UI isolate. |
if we're not awaiting, we need another back pressure mechanism. Otherwise we might degrade performance if the app is producing more events than the SDK can flush out (to disk or network) |
Background isolates might help solving this issue, if we are able to offload to a background Isolate and this Isolate is able to call method channels, only possible on Flutter 3.7 still. Edit: |
FileSystemTransport
by using compute()
FileSystemTransport
by using compute()
or background isolates
Checked the documentation for background channel usage, and we have the same Issue that we are facing with #1801, as we need to access ServicesBinding.rootIsolateToken, which is static, so we can't use the approach where we cast to dynamic and call a method that is unknown in older Flutter versions which we need to support. Is there approach or a way around this limitation? |
Short summary from the #1811 findings:
|
Have you checked that? Not sure if passing serialized data will cause bottleneck issues so I'd think this is just a nice to have in terms of improvement but alone probably doesn't warrant a min version bump to 3.7 |
Blocked by min version Flutter 3.7 |
We can try to use
compute()
heresentry-dart/flutter/lib/src/file_system_transport.dart
Lines 14 to 17 in bca59ab
in order to offload the conversion to another isolate.
This could improve the performance because we're not blocking the UI Isolate, especially if there are any attachments or big events.
There are some things which need to be considered.
The text was updated successfully, but these errors were encountered: