From a71a513def202b119328035dbd68e86c2c47f7ac Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 11 Feb 2022 14:53:08 +0100 Subject: Remap multiple items in referenced data. This patch increases the performance when remapping data. {D13615} introduced a mechanism to remap multiple items in a single go. This patch uses the same mechanism when remapping data inside ID datablocks. Benchmark results when loading the village scene of sprite fright on AMD Ryzen 7 3800X 8-Core Processor Before this patch 115 seconds When patch applied less than 43 seconds There is still some room for improvement by porting relink code. Reviewed By: mont29 Maniphest Tasks: T95279 Differential Revision: https://developer.blender.org/D14043 --- source/blender/blenkernel/BKE_lib_id.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/BKE_lib_id.h') diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index c4aa44706d5..c56cb616a9a 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -69,6 +69,11 @@ void *BKE_libblock_alloc(struct Main *bmain, short type, const char *name, int f */ void BKE_libblock_init_empty(struct ID *id) ATTR_NONNULL(1); +/** + * Reset the runtime counters used by ID remapping. + */ +void BKE_libblock_runtime_reset_remapping_status(struct ID *id) ATTR_NONNULL(1); + /* *** ID's session_uuid management. *** */ /** -- cgit v1.2.3