perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

PerfettoUI performance lag with large trace files on Chrome

Open WWKy opened this issue 1 year ago • 10 comments

When opening relatively large trace files (longer than 10 seconds) in PerfettoUI using the Chrome browser, the web UI experiences significant lag and performance issues. Specifically:

  • Clicking on "Process" to expand takes 1-2 seconds to respond.
  • Dragging the mouse to select a time range is also slow.
  • Multiple rapid interactions can cause the UI to freeze or become unresponsive.

Please help to check the causes of these performance issues and suggest solutions to fix PerfettoUI’s lag on Chrome with large trace files. Thank you!

Environment:

  • Browser: Chrome verison 137.0.7151.120 (Official Build) (64-bit)
  • PerfettoUI version: v50.1-3dbfbd210
  • Operating System: Windows 10

Image

Image

lag_20250625.7z.zip

WWKy avatar Jun 25 '25 12:06 WWKy

Can you please go to the flags section of the UI (on the sidebar) and enable the option "enable virtual track scrolling"

Does that fix the issue?

LalitMaganti avatar Jun 25 '25 13:06 LalitMaganti

@stevegolton fyi.

LalitMaganti avatar Jun 25 '25 13:06 LalitMaganti

Seconded, seems like the virtual scrolling flag should help a lot here.

stevegolton avatar Jun 25 '25 14:06 stevegolton

Can you please go to the flags section of the UI (on the sidebar) and enable the option "enable virtual track scrolling"

Does that fix the issue?

This works, the lag has lessened, thanks! But it still happens sometimes. Is there any other solution?

WWKy avatar Jun 26 '25 06:06 WWKy

When exactly does it happen with virtual scrolling turned on? Please provide exact repro steps with screenshots and videos where possible.

LalitMaganti avatar Jun 26 '25 08:06 LalitMaganti

Hey @WWKy, gentle reminder about this. If you could describe a little more about what is lagging, that would help us out massively. A video would be ideal. Thanks!

stevegolton avatar Jul 03 '25 08:07 stevegolton

@stevegolton @LalitMaganti Hi🙂,here are the video and trace. When I click to expand or collapse a process track, after the expand/collapse animation finishes, there’s a 2-3 second lag where clicking anywhere doesn’t do anything (no response).

I checked the query log, and it looks like the query didn’t take much time. I have tried "convert to .systrace" and load it again, but the issue is the same.

Please help. Thanks!

Image

lag_trace_2_video.zip

lag_trace_2.7z.zip

(P.S. The attachment size is limited ... So the trace file has been compressed using 7zip.)

WWKy avatar Jul 08 '25 03:07 WWKy

Thanks for the video. Seems like an odd one. Looks like all the DOM nodes load and even the tracks load properly when expanding the group, but input stops working for a few seconds?

I can't seem to repro on my machine (MacOS, M1 Pro). What are your machine's specs?

Would you be able to record a trace using the chrome devtools performance tab, export it the trace and post it here? See https://developer.chrome.com/docs/devtools/performance. Make sure to capture opening the group.

stevegolton avatar Jul 08 '25 09:07 stevegolton

Also, is this a new issue?

stevegolton avatar Jul 08 '25 09:07 stevegolton

Closing as we don't have a repro.

aMayzner avatar Jul 14 '25 09:07 aMayzner