firefox-devtools / firefox-devtools/profiler
Consider targeting the latest version of the profile format in our in-tree importers
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 30
Description
Currently, the ways that [importers](https://github.com/firefox-devtools/profiler/tree/main/src/profile-logic/import) generate profiles are different for different importers:
* chrome.js and dhat.js target the latest version of the processed profile format, through the use of `data-structures.js`.
* linux-perf.js targets version 24 of the gecko profile format (this is quite recent, it was targeting version 4 before).
* art-trace.js targets version 11 of the gecko profile format.
There are pros and cons for each cases.
### processed format or gecko format?
The processed format contains more tables that may be more cumbersome to populate. It also changes more often than the gecko format.
But it's also more structured than the gecko format where some data is stored in simple strings with a specific format.
Also because it's our pivot data it's also more natural to work with because we're used to it.
### target a specific version or latest version?
Targeting the latest version might make more sense, because being in-tree, it's easy to search and replace and keep consistent code and structures across the codebase.
However targeting a specific version moves the job of upgrading the profile data to latest version to upgraders. Once the code is written targeting some version we don't need to touch it anymore... unless we want to take advantage of newer capabilities of the newer versions (eg: using categories in the linux-perf importer).
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-628)
Contributor guide
Assessment
This issue has not been assessed yet.