Skip to content
Unverified Commit 3edf82d5 authored by Min-Yih Hsu's avatar Min-Yih Hsu Committed by GitHub
Browse files

[XRay] Reserve memory space ahead-of-time when reading native format log (#76853)

XRay used to struggle reading large log files. It turned out the
bottleneck was primarily caused by the reallocation happens when
appending log entries into a std::vector.
This patch reserves the memory space ahead-of-time since the number of
entries is known for most cases. Making llvm-xray runs 1.8 times faster
and uses 1.4 times less physical memory when reading large (~2.6GB) log
files.
parent 5ca2d75f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment