Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information