DescriptionImplementation of cache for general movie-related areas such as sequencer and clip editor (in the future)
Some changes in limiter were necessary:
- Limiter counted mapped memory twice when was checking how many memory is used.
- It was using "global" memory usage not memory usage by cached elements. It will cause big problems when there's large mesh or plenty of undo steps are in memory nothing would be cached in sequencer.
- To solve this problem introduced "callback" to measure cached element size. It could be not very accurate in general, but it works well for image buffers. And if this callback isn't set old-school memory usage check would be used.
- The whole cache used to get freed when memory limit exceeded, now it'll drop only as much elements as necessary to reduce memory usage.
Seqcache is switched to use this new cache code.
Patch Set 1 #
Total comments: 1
Patch Set 2 : Updated patch set with most of issues fixed. IMB_cache_limiter_* would be removed separately. #Patch Set 3 : Most recent patchset #MessagesTotal messages: 6
|