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

VmService.getPerfettoVMTimelineWithCpuSamples is slow #55137

Open
kenzieschmoll opened this issue Mar 7, 2024 · 1 comment
Open

VmService.getPerfettoVMTimelineWithCpuSamples is slow #55137

kenzieschmoll opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request triaged Issue has been triaged by sub team vm-service The VM Service Protocol, both the specification and its implementation

Comments

@kenzieschmoll
Copy link
Contributor

I'm working on switching DevTools over to the new Perfetto VM timeline APIs and away from the legacy Chrome trace format APIs: flutter/devtools#4755

I'm seeing some performance concerns with getPerfettoVMTimelineWithCpuSamples. On average calling getPerfettoVMTimelineWithCpuSamples takes 1-2 orders of magnitude more time than calling getPerfettoVMTimeline. Can we optimize this at all, or is this overhead expected and unavoidable?

Screenshot 2024-03-07 at 10 16 06 AM

In the short term, we could have a setting in the DevTools "Enable CPU sampling in the timeline", that is off by default and warns users that this may have performance implications to turn on.

@derekxu16 @bkonyi

@lrhn lrhn added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Mar 7, 2024
@a-siva a-siva added the vm-service The VM Service Protocol, both the specification and its implementation label Mar 8, 2024
@a-siva a-siva added P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team labels Mar 8, 2024
@derekxu16 derekxu16 added P3 A lower priority bug or feature request and removed P2 A bug or feature request we're likely to work on labels Mar 20, 2024
@derekxu16
Copy link
Member

Reducing the priority to P3, because we expect requesting CPU samples from the VM Service to be slow compared to requesting the timeline. I will try to profile the VM Service code at some point to see if there's are any significant performance improvements we can make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request triaged Issue has been triaged by sub team vm-service The VM Service Protocol, both the specification and its implementation
Projects
None yet
Development

No branches or pull requests

4 participants