You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the raw stack table to store the prefix as an index offset.
Replace `RawStackTable.prefix` with a `prefixOffset` column. For each
stack i, `prefixOffset[i] === 0` means i is a root, and `prefixOffset[i]
=== k` (with k > 0) means i's parent is at index i - k. All values are
non-negative because the stack table is stored in topological order.
The motivation is profile size: relative offsets are typically small numbers
(stack depth) instead of large absolute indexes, so they compress better in
the on-wire JSON. The derived `StackTable.prefix` keeps its absolute Int32Array
representation for consumers that prefer that form.
Copy file name to clipboardExpand all lines: docs-developer/CHANGELOG-formats.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,19 @@ Note that this is not an exhaustive list. Processed profile format upgraders can
6
6
7
7
## Processed profile format
8
8
9
+
### Version 67
10
+
11
+
The `prefix` column of `profile.shared.stackTable` was replaced with a `prefixOffset` column, to improve compressibility.
12
+
13
+
The `prefixOffset` values have the following meanings:
14
+
15
+
-`prefixOffset[i] === 0` means: stack `i` is a root.
16
+
- Otherwise, `prefixOffset[i] === k` (k > 0) means: `i`'s parent has index `i - k`.
17
+
18
+
Parents always come before their children in the stack table (the stack table is stored in topological order), so these offsets are always positive and always point backwards.
19
+
20
+
In the JSON / JSLB file, the `prefixOffset` column can be stored as an array of numbers or as an `Int32Array` (JSLB only).
21
+
9
22
### Version 66
10
23
11
24
The `prefix` column of `profile.shared.stackTable` now uses `-1` instead of `null` to indicate "this stack node is a root".
0 commit comments