mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
f8df4a17a0
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 |
||
---|---|---|
.. | ||
__mocks__ | ||
__tests__ | ||
github | ||
patch | ||
SplitDiffView | ||
third-party/github | ||
types | ||
Comparison.ts | ||
compat.ts | ||
ContextMenu.css | ||
ContextMenu.tsx | ||
debounce.ts | ||
Drawers.css | ||
Drawers.tsx | ||
EnsureAssignedTogether.ts | ||
fs.ts | ||
hooks.tsx | ||
Icon.css | ||
Icon.tsx | ||
jest.config.js | ||
KeyboardShortcuts.tsx | ||
lazyInit.ts | ||
LRU.ts | ||
minimalDisambiguousPaths.ts | ||
OperatingSystem.ts | ||
package.json | ||
pathUtils.ts | ||
RateLimiter.ts | ||
rejectAfterTimeout.ts | ||
testUtils.ts | ||
tsconfig.json | ||
TypedEventEmitter.ts | ||
typeUtils.ts | ||
utils.ts |