#21984 Investigate alternate allocators
Issue created by
sureshjoshi
This may have been done at some point in the past (
#5990), but I'm wondering if there are any wins to be had by swapping to a different allocator (or maybe a different allocator on certain systems).
I did a throwaway test on my MacOS machine, and swapping over to mimalloc reduced startup time from 7 seconds to 5.8 seconds (maybe at the cost of extra memory usage though).
That was a completely unscientific, but it was also on a repo that wasn't doing much compared to some of the larger repos some teams have.
Until there is a good sample repo and memory/performance profile, this investigation would be mostly pointless.
Without digging in too deep to the existing code, the Pants structure of many, many, many "small" allocations could line up well with an arena, or an allocator that focuses on fragmentation mitigation.
The need for this might also be reduced after call-by-name, if we can reduce solver usage (but I'm not sure).
pantsbuild/pants