mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
585899f419
Summary: There is no need to generate expensive file history stream if only one node is requested. I refactored code that generated stream of history commits, so it'd first yield the nodes and only then prefetch their parents. That will help to solve latency problem for the history request for only a single commit. I removed BFS queue and added two state variables: ready nodes and already processed: * The last are the nodes that were return as a part of a history stream on the last iteration and now can be used to construct next BFS layer: prefetch fastlog batches, fill the commit graph, take parents in BFS order to form new bunch of nodes. * First are used if it's the first iteration - there is no processed nodes yet but there are some that are ready to be returned. I believe removing the queue I simplified the code and logic a little bit. Reviewed By: StanislavGlebik Differential Revision: D19818100 fbshipit-source-id: c30d28c623464ba3552a00e8542552f7655076ef |
||
---|---|---|
.. | ||
fastlog_impl.rs | ||
lib.rs | ||
mapping.rs | ||
ops.rs |