firefox-devtools / firefox-devtools/profiler

Proposed tweak to marker JSON format: Move type outside of data, into its own column

Open
#4,494 2 comments 0 reactions 1 assignee Claimed by @fatadel View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

The schema of a marker is currently indicated by a `type` property on the `data` object of a marker.

It would be nice if the type was stored outside of the data object. This would mean that `type` is no longer a reserved key name that cannot be used for fields, so it would avoid bugs like [bug 1939499](https://bugzilla.mozilla.org/show_bug.cgi?id=1939499).

My proposal is:

1. Move the `data.type` value out of the `data` object, into a separate marker table `type` column.
1. Optional: Instead of a string, make it an integer which indexes into the global marker schema array.

*Edit 2025-01-06: I rewrote this comment to mention the collision issue and removed the Rust API justification*

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-615)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.