Skip to content
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

Dart UI Isolates performing at 50% compared to Flutter Isolates #4

Open
rlueders opened this issue Nov 7, 2024 · 2 comments
Open

Comments

@rlueders
Copy link

rlueders commented Nov 7, 2024

I switched to Dart UI Isolate earlier this year. A few days ago I noticed my print statements from the Dart UI Isolates were not showing up in the console. I tried switching back to Flutter Isolates to to see print statements would appear and indeed they did. I also noticed that the performance of the isolates roughly doubled. That is, the Flutter Isolates were performing twice as fast as the Dart UI Isolates. I'm not really sure how this is possible. I would do some more troubleshooting but I'm not really sure were to start since I am merely switching the pub reference from dart_ui_isolate to fluter_isolate.

@rlueders
Copy link
Author

rlueders commented Nov 7, 2024

Also, the tests in my above comment were running on the latest stable Flutter release (3.24.4) on a physical iPhone 12 Pro Max.

@rlueders
Copy link
Author

rlueders commented Nov 7, 2024

Digging a little deeper, this appears to have something to do with thread prioritization on IOS. For example, running the CPU profiler from xCode with Flutter Isolate I observe CPU usage of around 800% but with Dart UI Isolate, CPU usage is around 300%. To reiterate, the only thing changing between these two tests is the Isolate package being used. Also, it appears that that this issue only affects IOS as my testing on Android does not indicate any performance disparity between the two packages.

Flutter Isolate:
Screenshot 2024-11-07 at 9 27 01 AM

Dart UI Isolate
Points of interest

@rlueders rlueders changed the title Dart UI Isolates performing at 50% compared to Flutter UI Isolates Dart UI Isolates performing at 50% compared to Flutter Isolates Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant