Page MenuHome

Patch to limit memory usage in sequencer
Closed, ArchivedPublicPATCH


This patch limits the memory usage in the sequencer by throwing out
the oldest cached ImBufs.

It also implements a generic Mem Cache Limiter framework written in C++
with an additional C interface used by the Imbuf cache limiter.

The upper memory cache limit is hard coded to 32 MB for the moment -
I'll add an userpref entry later.

This patch is essential for those who want to use blender as an NLA editor
for longer sequences (say 15 minutes e.g. or longer if someone raises the
frame limit.)

The upper memory limit is a _soft_ limit. If the sequence renderer temporarily
needs more memory then it is granted. If you want to hard core test this,
set the memory limit in the source file (MEM_CacheLimiterC-Api.cpp) to 1 byte.
It should still work - blender will be very slow - but it should work.

Setting the limit to 0 bytes disables the cache limit completely and blender
will eat memory like popcorn again.