Closed Bug 1550702 Opened 3 years ago Closed 3 years ago

Improve handling of Gecko profiler data


(Testing :: Raptor, defect, P2)

Version 3


(firefox69 fixed)

Tracking Status
firefox69 --- fixed


(Reporter: whimboo, Assigned: whimboo)


(Blocks 1 open bug)



(1 file)

When running tests for the upcoming Youtube playback performance benchmark (bug 1548845) the generated gecko profiles are huge! As such the current handling of its data causes lots of problems, because it is way to slow. Here some ideas:

  1. Don't call console.log() for the profile data before sending the data to the Python harness. This could add a hundreds of MB entry to the console, and causes a slowdown.

  2. The Raptor web extension tries to send the full profile data via a single packet over the local / remote (android) socket connection. Imagine what could happen when you do that with >100 MB or more data.

The best way to improve the performance would be to let the Raptor web extension directly save the profile to disk, and only inform the harness of the path. Sadly this is restricted for web extensions beside storing data via local storage.

Given that the profiler is a Gecko only thing anyway, I will check if I can build an addition via WebExtensions Experiments, which would allow us to access the profiler directly. That way we would simply call dumpProfileToFileAsync():

Assignee: nobody → hskupin
Priority: -- → P1
No longer blocks: 1548845
See Also: → 1548845
See Also: → 1544463

For a description of Webextensions Experiments see:

See Also: → 1551992
See Also: → 1552845

The dumping of the profile directly to disk will be implemented in the profiler experimental API directly, which is covered by bug 1552845. Once that has been done Raptor can make use of it.

Depends on: 1552845

Improvements can be seen eg. for the speedometer tests which have profiles of about 33MB.

With the unpatched version it takes 5s:

With the patched version it takes 2s:

Note that we also have a synchronous handling before shutting down the browser.

Priority: P1 → P2
Pushed by
[raptor] Switch to dumpProfileToFile() for saving the Gecko profile. r=perftest-reviewers,sparky
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.