Avoid driver target remapping when freeing the whole database
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 Nov 2016 14:38:03 +0000 (15:38 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 Nov 2016 14:56:40 +0000 (15:56 +0100)
commit85e51b063854d81b486d7099536bc21404fc627e
treefe5eb69e081b5c245a4b8619477039b7c21cfd77
parent0cd1b5ef85142cc3dcd69acdd5dbfc42a622ee3b
Avoid driver target remapping when freeing the whole database

Added BKE_libblock_free_data_ex() which takes special do_id_user
argument which basically indicates whether main database was already
taken care about not having "dead" pointers.

Gives about 40% speedup of main database free with quadbot scene
(3.4sec vs. 5.4 sec on quite powerful desktop).
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/intern/library_remap.c