mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
a50418112f
Summary: D14677339 added tracing to all HgImporter requests. Each trace loads a thread-local variable through EdenStats::getStatsForCurrentThread(). Each of these loads has a small but non-trivial cost. Because each instance of HgImporter is used only on one thread, each getStatsForCurrentThread() call returns the same EdenThreadStats object. Avoid the thread-local-variable lookups by caching the result of getStatsForCurrentThread() in HgImporter. This diff should not change behavior. Reviewed By: simpkins Differential Revision: D14794284 fbshipit-source-id: d1609a1720d44c680dc0ebaa2536779def2a6f37 |
||
---|---|---|
.. | ||
test | ||
CMakeLists.txt | ||
EdenStats.cpp | ||
EdenStats.h | ||
Tracing.cpp | ||
Tracing.h |