Page MenuHome

Experimental mempool use for ID datablocks
Needs ReviewPublic

Authored by Campbell Barton (campbellbarton) on Jul 21 2016, 6:28 PM.

Details

Summary

This uses memory pools for ID datablocks, reducing memory fragmentation and improves memory access speed for look-ups.

Uploading the patch for reference, actual gains aren't so much (~20 - 30% faster lookups & object duplication).

  • USE_ID_MEMPOOL define can be disabled to use normal memory allocation.
  • Local ID's (nodeTrees) don't use memory pools.
  • Needed to share memory pools between Main, since library linking moves ID's between Main's when linking, making local.

Overall, quite skeptical of this being worth the extra overhead and complication from supporting a different allocation method.


Applies to rBecd33bacf0992d67bbad8e2c70996639837503b1

Diff Detail

Repository
rB Blender
Branch
TEMP-ID_MEMPOOL
Build Status
Buildable 31
Build 31: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from to Experimental mempool use for ID datablocks.

Well… Am not a big fan of adding more complexity here either, especially if gains are not that great… Nice test though. :)