Performance page slow to load on Linux
Dev tools peformance tab takes over 10 seconds to load, compared to just 2 seconds for observatory
launch-performance-tab-devtools.webm
observatory-timeline-launch.webm
This is on a simple dart app:
$ cat i1.dart
main() {
Future.delayed(Duration(seconds :5), () { print('elapsed'); });
launched like
$ out/ReleaseX64/dart --observe:8080 --disable-service-auth-codes --timeline_streams=all --timeline-recorder=endless --serve-observatory i1.dart
Devtools app launched separately, connected to this dart app paused.
@kenzieschmoll
@jakemac53 this might be a good one to tackle next while you are looking at performance.
It looks to me like this is resolved now - I did notice however that if the app is paused, we will hang forever on this page (with a working spinner).
Most of the time seems to be spent inside of base64.decode today and we can't really fix that, but it is already being split up into a lot of small chunks of work.
Here is what I see using the same example app today:
https://github.com/user-attachments/assets/f226191e-54d4-4139-bd7d-a1042e3a0ab9
It looks to me like this is resolved now - I did notice however that if the app is paused, we will hang forever on this page (with a working spinner).
@bkonyi is it expected that the VM service calls for the performance page (getPerfettoVmTimeline, listening to events on the Extension stream, etc.) would hang for a paused app?
https://github.com/flutter/devtools/pull/9162 fixes the hang issue @jakemac53 described here.
@aam do you have a reliable repro for the slow load? I followed your repro steps above but opening the performance page loads quickly for me. I am on a Mac. From your SDK path it looks like you may be using Linux?
foo.dart
cat foo.dart
main() {
Future.delayed(Duration(seconds :5), () { print('elapsed'); });
}%
xcodebuild/ReleaseARM64/dart --observe:8080 --disable-service-auth-codes --timeline_streams=all --timeline-recorder=endless --serve-observatory foo.dart
Open the printed DevTools URL --> navigate to the performance page --> page loads quickly.
do you have a reliable repro for the slow load? I
Yes, simple dart --observe hello.dart on my machine consistently takes few seconds from opening the browser with the link before browser page is populated with some content.
Observatory on the other land is loaded immediately.
@aam What machine do you have? I'm wondering if this is due to OS or architecture differences. AFAIK @jakemac53, @bkonyi, and I are all using MacOS and none of us can reproduce.
@aam What machine do you have? I'm wondering if this is due to OS or architecture differences.
it's a glinux.