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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-16 13:50:20 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-16 14:02:37 +0300
commitce6d20b54e3077e8d57103de3e7933069a2d54e7 (patch)
tree63ddcbe374b95993398c9e0cf2fc8d3c43fc42bd /source/blender/blenkernel/BKE_library.h
parentfcbbfb7789890624cdfb78e2b6036414d925616b (diff)
Add experimental batch IDs deletion.
Main idea is to remove IDs to be deleted from Main, to avoid looping on them to remove other deleted IDs usage (this is the most expensive process in ID deletion, by far). Speed improvements when deleting a large amount of IDs from a Main containing a lot of them is quite significant, some examples for Objects: * Removing 1k from 10k: 32% quicker (2.5s to 1.7s). * Removing 10k from 20k: 60% quicker (59s to 23s). * Removing 20k from 20k: 99.5% quicker (82s to 0.4s)! Note however that this process is more risky/touchy, since we by-pass some safety checks from regular ID removal here. So will only give access to that code from python API for now (in separate commit), so that it gets really tested. Also still need to think about how to hook it up in UI (probably mostly for Outliner), since we often do higher-level operations there...
Diffstat (limited to 'source/blender/blenkernel/BKE_library.h')
-rw-r--r--source/blender/blenkernel/BKE_library.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index d03834d2995..0560646c49b 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -140,15 +140,16 @@ enum {
LIB_ID_FREE_NO_UI_USER = 1 << 9, /* Do not attempt to remove freed ID from UI data/notifiers/... */
};
-void BKE_libblock_free_datablock(struct ID *id, const int flag) ATTR_NONNULL();
-void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL();
+void BKE_libblock_free_datablock(struct ID *id, const int flag) ATTR_NONNULL();
+void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL();
void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, const bool use_flag_from_idtag);
void BKE_id_free(struct Main *bmain, void *idv);
-void BKE_id_free_us(struct Main *bmain, void *idv) ATTR_NONNULL();
+void BKE_id_free_us(struct Main *bmain, void *idv) ATTR_NONNULL();
-void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL();
+void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL();
+void BKE_id_multi_tagged_delete(struct Main *bmain) ATTR_NONNULL();
void BKE_libblock_management_main_add(struct Main *bmain, void *idv);
void BKE_libblock_management_main_remove(struct Main *bmain, void *idv);