From 66a40779271b55498216cc14b4df3ca8d575137c Mon Sep 17 00:00:00 2001 From: "Sv. Lockal" Date: Sat, 3 Aug 2013 11:35:09 +0000 Subject: fix for [#36260] 2,300 Objects Makes Blender Unresponsive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - performance of outliner was low because of unoptimal data structures. - now it uses BLI_mempool instead of custom mempool and GHash to make searches for duplicates faster. - also fix undesired behaviour of BLI_mempool_as_arrayN thanks to Campbell Barton and Lukas Tönne for helping me get a better fix put together. --- source/blender/makesdna/DNA_outliner_types.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna/DNA_outliner_types.h') diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index 5f9c90f09f7..53061b55e2d 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -32,6 +32,8 @@ #ifndef __DNA_OUTLINER_TYPES_H__ #define __DNA_OUTLINER_TYPES_H__ +#include "DNA_defs.h" + struct ID; typedef struct TreeStoreElem { @@ -39,9 +41,12 @@ typedef struct TreeStoreElem { struct ID *id; } TreeStoreElem; +/* used only to store data in in blend files */ typedef struct TreeStore { - int totelem, usedelem; - TreeStoreElem *data; + int totelem DNA_DEPRECATED; /* was previously used for memory preallocation */ + int usedelem; /* number of elements in data array */ + TreeStoreElem *data; /* elements to be packed from mempool in writefile.c + * or extracted to mempool in readfile.c */ } TreeStore; /* TreeStoreElem->flag */ -- cgit v1.2.3