[Bf-committers] need help on vgroup/mdisp allocation

joe joeedh at gmail.com
Wed May 11 22:32:04 CEST 2011


A while back, testers of bmesh were complaining of performance issues
related to vgroup and mdisp allocation.  I wrote a temporary fix
(BLI_cellalloc.h/c) but it's too evil for trunk.  The basic problem is
how vgroups/mdisps overuse the system allocator.  The optimal solution
would be to compile with jemalloc on all platforms, but I dunno how
hard that would be (I think Firefox does it).

Anyway, help on other solutions would be great.  MDisps should be
easy; I can add a mempool to CustomDataLayer, and use it for
allocation (though it would touch a lot of code).  Vgroups have a
variable allocation size, however, and I'm unsure how to deal with
them (they really can cause significant performance problems).

Using jemalloc on all platforms might be the best approach, plugged
into guardedalloc.  Integrating something like mempool or memarena in
CustomData is possible, but not ideal (given how much code it would
affect, and how close we are to trunk integration).

Joe


More information about the Bf-committers mailing list