dillon1000/react
Commit
Browse files Remove ReactID.primeTree in favor of priming in ReactID.getID.
Although it would have been nice to prime the entire tree and achieve a cache hit rate of 100%, that cost would have to be paid up front, during page rendering. This patch avoids priming up front in favor of making the most of the work done by `ReactMount.findReactRenderedDOMNodeSlow`, which calls `ReactID.getID` while traversing the rendered DOM. The insight is this: if `getID` simply primes the cache whenever it finds a new ID, then `findReactRenderedDOMNodeSlow` will end up priming quite a few more nodes that are actually involved in `ReactID.getNode` lookups, and we won't need `primeTree` at all.
Changed paths1 file
First-parent comparisonsrc/core/ReactID.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…