On Mon, Apr 30, 2018 at 5:31 PM, Jameson Miller <jamill@xxxxxxxxxxxxx> wrote: > This patch series improves the performance of loading indexes by > reducing the number of malloc() calls. Loading the index from disk is > partly dominated by the time in malloc(), which is called for each > index entry. This patch series reduces the number of times malloc() is > called as part of loading the index, and instead allocates a block of > memory upfront that is large enough to hold all of the cache entries, > and chunks this memory itself. This change builds on [1]. I have only looked at the mem-pool related patches to see if mem-pool.c is good enough to replace alloc.c. To me, it's a "yes" after we optimize mem_pool_alloc() a bit (not that performance really matters in alloc.c case, but that may be because it's already blazingly fast that we never noticed about it). I probably should look at read-cache.c changes too. Maybe later. Although after the change to use xmalloc() per entry a few years(?) ago, it should be straight forward to use a different memory allocator. -- Duy