firefox-devtools / firefox-devtools/profiler

Use memoize-immutable for per-index selectors

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

Description

From Julien:
> I think we would be better off using memoize-immutable to handle the cache:
> ```js
> const _getCounterSelectors = memoize(_createCounterSelectors, { cache: new Map() });
> export const getCounterSelectors = (index: CounterIndex) => _getCounterSelectors(index);
> ```
>
> And get rid of the manual cache management.

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

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.