sapling/addons/shared
Evan Krause f8df4a17a0 Add useDeepMemo
Summary:
In the previous diffs we added a function to build a tree structure for rendering files. This build process constructs a lot of temporary Maps, so it would be ideal to memoize it for performance. However, we need it to re-render if the list of paths changes in any way. This means regular react useMemo won't work, we need deep memoization.

One way to do this might be to use Recoil selectors more aggressively, so we memoize higher in the chain. But we call Uncommitted changes with different parameters in different places simultaneously, so it's a bit more convenient in our rendering to use useMemo instead.

Reviewed By: quark-zju

Differential Revision: D44775134

fbshipit-source-id: f4be2b01126d4bb21ad7758184914a0a16ed0d9c
2023-04-11 22:57:12 -07:00
..
__mocks__ Add context menu 2023-01-13 09:14:31 -08:00
__tests__ Add useDeepMemo 2023-04-11 22:57:12 -07:00
github Re-sync with internal repository 2022-11-15 00:48:09 -08:00
patch isl: add error messages for failure cases of patchParser 2023-02-03 17:43:23 -08:00
SplitDiffView Fix line numbers wrapping in comparison view 2023-04-03 13:17:57 -07:00
third-party/github Re-sync with internal repository 2022-11-15 00:48:09 -08:00
types Add shared types to interact with debugstack commands 2023-03-30 11:19:27 -07:00
Comparison.ts Support clicking on line numbers to open files in the comparison view 2023-02-28 10:34:54 -08:00
compat.ts Add AbortController for nodejs < 14 2023-02-07 17:45:05 -08:00
ContextMenu.css Add context menu 2023-01-13 09:14:31 -08:00
ContextMenu.tsx More stack actions in context menu 2023-03-21 12:17:22 -07:00
debounce.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
Drawers.css Mitigate drawer styling bug when modal is visible 2022-11-18 16:42:13 -08:00
Drawers.tsx Re-sync with internal repository 2022-11-15 00:48:09 -08:00
EnsureAssignedTogether.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
fs.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
hooks.tsx Add useDeepMemo 2023-04-11 22:57:12 -07:00
Icon.css isl: move Icon from isl -> shared 2023-01-31 16:05:21 -08:00
Icon.tsx Add simple star rating 2023-02-09 18:37:31 -08:00
jest.config.js Add context menu 2023-01-13 09:14:31 -08:00
KeyboardShortcuts.tsx Support arrow keys to change selected commit 2023-03-22 13:49:35 -07:00
lazyInit.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
LRU.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
minimalDisambiguousPaths.ts Use minimal disambiguous paths when displaying uncommitted changes 2023-02-07 10:15:08 -08:00
OperatingSystem.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
package.json Add useDeepMemo 2023-04-11 22:57:12 -07:00
pathUtils.ts Don't use leading path sep for paths 2023-02-07 10:15:08 -08:00
RateLimiter.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
rejectAfterTimeout.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
testUtils.ts Include UI state in bug reports 2023-02-09 18:37:31 -08:00
tsconfig.json Re-sync with internal repository 2022-11-15 00:48:09 -08:00
TypedEventEmitter.ts Re-sync with internal repository 2022-11-15 00:48:09 -08:00
typeUtils.ts Include UI state in bug reports 2023-02-09 18:37:31 -08:00
utils.ts mapObject util 2023-02-23 13:19:40 -08:00