mstange · GitHub

@mstange

@mstange mstange changed the title More typed arrays: sample + counter times More typed arrays: sample + counter times, some frametable columns

Jul 7, 2026

Closed

@mstange

@mstange

mstange marked this pull request as ready for review

July 7, 2026 04:41

@mstange

@mstange

@mstange

We already have this split for the SamplesTable, but not yet for the
other tables. Having it for all tables means that SamplesLikeTable can
always be one of the derived tables.
The goal is to make the derived SamplesTable have a Float64Array for the
time column, and for the raw tables to allow both number[] and Float64Array
for their time or timeDeltas columns. This will be easier once
SamplesLikeTable is always a derived table.

@mstange

The following derived tables now use `Float64Array` for their `time` column:
- `SamplesTable` (derived samples)
- `CounterSamplesTable`
- `JsAllocationsTable` and `UnbalancedNativeAllocationsTable`
  (derived allocations, introduced by the previous commit)
- `SamplesLikeTable`
The raw tables still use `number[]`, as before, so the profile format is unchanged.
Same principle as what we've done for the stack table and the samples table.
The goal is to have the columns in the derived version always be typed arrays,
and the raw ones can take either a typed array or a plain array.
This commit doesn't introduce any differences between the raw and derived
frame table; the two are identical for now.
Specifically:
  - `func` as Int32Array
  - `address` as Int32Array (already uses -1 for "no address")
  - `inlineDepth` as a Uint8Array.
The raw frame table is unchanged, so this does not affect the profile format.
Similar to what we've done for the raw stack table builder:
The builder always has plain arrays so that we can add frames
one by one by pushing to the column arrays.
…tables.
Same idea as with the other builders.
…ormat.

@mstange

@mstange

Merged

mstange added a commit that referenced this pull request

Jul 13, 2026
…r-edit (#6167)
<!-- profiler-preview-links:start -->
[Main](https://main--perf-html.netlify.app/) | [Deploy
preview](https://deploy-preview-6167--perf-html.netlify.app/)
<!-- profiler-preview-links:end -->
profiler-edit runs profile compacting on the output profile, and profile
compacting converts some columns to their typed array form but not
others - it only touches columns which contain indexes which refer to
other tables. So this adds a separate pass over the profile to "optimize
the profile for storage".
We'll be able to use this new function for the "upload profile" code
path once we switch that to uploading JSLB files; before we make that
change, converting to typed arrays would be a waste because serializing
to JSON would need to convert them back to regular arrays again.
I had these patches applied when I generated the "after" profile in
#6139 (comment)
- without this, profiler-edit would have left most of those columns
alone and the size profile wouldn't have looked much different.

Merged

canova added a commit that referenced this pull request

Jul 21, 2026
Changes:
[Sky Ning] Skip preview links for non-main PRs (#6161)
[spokodev] fix(gecko-upgrade): don't crash on a counter with empty
sample_groups (#6160)
[fatadel] Show counter values over time in profiler-cli (#6136)
[Markus Stange] Make profile-conversion snapshots more compact and
meaningful (#6152)
[Markus Stange] More typed arrays: sample + counter times, some
frametable columns (#6139)
[Nazım Can Altınova] Only render a marker url field as a link when the
whole value is a URL (#6163)
[fatadel] Show each counter's owning process in profiler-cli (#6164)
[Nazım Can Altınova] Document the pre-existing thread info and network
JSON schemas in the cli (#6171)
[Markus Stange] Copy column contents in
getRawSamplesTableBuilderFromExisting for consistency (#6168)
[Markus Stange] Convert eligible columns to typed arrays when outputting
from profiler-edit (#6167)
[Markus Stange] Remove unused samples.thread column (#6151)
[Markus Stange] Fixed botched merge which broke 'yarn ts' (#6174)
[Nazım Can Altınova] Add marker handles to `profiler-cli thread network`
(#6172)
[Markus Stange] Update json-slabs 0.3.0 → 0.4.0 (major) (#6176)
[Nazım Can Altınova] Surface network activity across profiler-cli
(#6175)
[Nazım Can Altınova] Add `profile meta` command to profiler-cli (#6177)
[Markus Stange] Allow raw marker table's `startTime` and `endTime`
columns to be Float64Array (#6169)
[nightcityblade] Fix light theme text selection colors (#6186)
[Nazım Can Altınova] Import source map URLs from Chrome DevTools traces
(#6190)
[Nazım Can Altınova] Rename yarn `build-profiler-cli` script to
`build-cli` (#6191)
[Nazım Can Altınova] Migrate husky to version 9 (#6201)
[Nazım Can Altınova] Fix horizontal overflow when the transform
navigator is long (#6199)
[fatadel] Add a 'hexadecimal' marker schema field format (#6197)
[Nazım Can Altınova] Bump source-map to 0.8.0 and remove the old type
workaround (#6202)
[Nazım Can Altınova] 🔃 Sync: l10n -> main (July 21, 2026) (#6209)
And special thanks to our localizers:
fr: parmegiani.thomas
fr: Théo Chevalier
sr: Марко Костић (Marko Kostić)
sv-SE: Luna Jernberg
tr: Grk
zh-CN: Ariel
zh-CN: Olvcpr423

Read the original on github.com ↗