Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2013-08-03 15:35:09 +0400
committerSv. Lockal <lockalsash@gmail.com>2013-08-03 15:35:09 +0400
commit66a40779271b55498216cc14b4df3ca8d575137c (patch)
treefdd0ed4df73ca2ecb9f3c58813e8338c53eedadb /source/blender/makesdna/DNA_outliner_types.h
parent91d148b8914bb198a78c3789fa39c2850d37d219 (diff)
fix for [#36260] 2,300 Objects Makes Blender Unresponsive
- 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.
Diffstat (limited to 'source/blender/makesdna/DNA_outliner_types.h')
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h9
1 files changed, 7 insertions, 2 deletions
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 */