Blender Git Loki

Git Commits -> Revision 358e07f

Revision 358e07f by Campbell Barton (master)
February 22, 2019, 03:55 (GMT)
readfile: reduce memory usage at load time

Delay loading all DATA sections of the blend file until they're needed.

Loading all data-blocks caused high peak memory usage especially with
libraries - since a lot of data may exist which isn't used directly.

In one test (spring project: 10_010_A.anim.blend),
peaked at ~12.5gig, dropping back to ~2.5gig once loaded.
With this change peaks memory usage reaches ~2.7gig while loading.

Besides this there are some minor gains from not having to read data
from the file-system and we can skip an alloc + memcpy reading data
written with the same version of Blender.

Commit Details:

Full Hash: 358e07f447e9ed7f87f419e8d027e73c97c00077
Parent Commit: f3e9dff
Lines Changed: +145, -3

2 Modified Paths:

/source/blender/blenloader/intern/readfile.c (+144, -3) (Diff)
/source/blender/blenloader/intern/readfile.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021