Skip to content

ui: optimize BreakdownTracks and AndroidBinderViz performance#6050

Draft
gignat-dev wants to merge 1 commit into
mainfrom
dev/gignat/android_binder_viz_make_faster
Draft

ui: optimize BreakdownTracks and AndroidBinderViz performance#6050
gignat-dev wants to merge 1 commit into
mainfrom
dev/gignat/android_binder_viz_make_faster

Conversation

@gignat-dev
Copy link
Copy Markdown
Contributor

Significantly reduce the time it takes to load traces with large breakdown
track hierarchies (like Android Binder) through three optimizations:

  1. Projected Path for BreakdownTracks: Instead of running the expensive intervals_overlap_count macro O(N) times (once per track node), pre- calculate all intersections upfront into a shared temporary table. Individual tracks now just run a cheap filter/aggregation against this table. This is enabled for standard count-based breakdown tracks without pivots or complex joins.
  2. Batch SQL Table Creation: On the legacy path, CREATE PERFETTO TABLE statements for counter tracks are now accumulated during the hierarchy walk and flushed to the engine in a single batched query, reducing IPC overhead.
  3. Parallelize Binder Tracks: The AndroidBinderViz plugin now uses Promise.all to kick off the generation of both server and client track hierarchies concurrently rather than sequentially.

  Significantly reduce the time it takes to load traces with large breakdown
  track hierarchies (like Android Binder) through three optimizations:

   1. Projected Path for BreakdownTracks: Instead of running the expensive
     intervals_overlap_count macro O(N) times (once per track node), pre-
     calculate all intersections upfront into a shared temporary table.
     Individual tracks now just run a cheap filter/aggregation against this
     table. This is enabled for standard count-based breakdown tracks without
     pivots or complex joins.
   2. Batch SQL Table Creation: On the legacy path, CREATE PERFETTO TABLE
     statements for counter tracks are now accumulated during the hierarchy
     walk and flushed to the engine in a single batched query, reducing IPC
     overhead.
   3. Parallelize Binder Tracks: The AndroidBinderViz plugin now uses
     Promise.all to kick off the generation of both server and client track
     hierarchies concurrently rather than sequentially.
@github-actions
Copy link
Copy Markdown

🎨 Perfetto UI Builds

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

Successfully merging this pull request may close these issues.

1 participant