firefox-devtools / firefox-devtools/profiler

Replace getProcessesWithMemoryTrack with more generic approach

Open
#5,962 0 comments 0 reactions 0 assignees View on GitHub
memory
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

#5752 consolidated Memory / Power / Bandwidth / ProcessCPU into a single generic counter track type. However, we still have [getProcessesWithMemoryTrack](https://github.com/firefox-devtools/profiler/blob/main/src/selectors/profile.ts#L550), which hard-codes memory-specific behavior. The selector tells the main thread whether a memory track already exists, so it knows whether to suppress duplicate rendering of the memory markers (we render them on the main thread's marker row, if no memory track exists).

This behavior should be generalized and not hardcoded in the frontend code. Apparently, we should replace the selector with a schema-based approach.

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

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.