Blender Git Loki

Git Commits -> Revision db4fe8e

Revision db4fe8e by Bastien Montagne (master)
July 27, 2021, 12:53 (GMT)
BlenRead: Add GHash-based search for already read linked IDs.

Ths commit adds a new `IDNameLibMap` to `Main`, used during file reading
to quickly find already read linked IDs.

Without that, search would use string-based search over list of linked
data, which becomes extremely slow and inneficient in cases where a lot
of IDs are linked from a same library. See also {T89194}.

Extrem-usecase reported in T89194 is now about 4 times faster in linked
data reading (about 2 times faster for the whole .blend file loading).

More normal cases (like Sprites studio production files) have barely
measurable speed improvements, a few percents at best.

NOTE: `main_idmap` API was extended to support insertion and removal of
IDs from the mapping, avoids having to re-create the whole thing several
time during libraries expansion in readcode.

Differential Revision: https://developer.blender.org/D11757

Commit Details:

Full Hash: db4fe8e3223b36615e53cf64f4a55f6d974c4597
Parent Commit: e37c876
Lines Changed: +142, -16

5 Modified Paths:

/source/blender/blenkernel/BKE_main.h (+4, -0) (Diff)
/source/blender/blenkernel/BKE_main_idmap.h (+5, -0) (Diff)
/source/blender/blenkernel/intern/main.c (+5, -0) (Diff)
/source/blender/blenkernel/intern/main_idmap.c (+73, -14) (Diff)
/source/blender/blenloader/intern/readfile.c (+55, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021