In testing most of today, I watched memory usage to try to better understand how it is working. It matches what Stefan is seeing. I have imported a bunch of 4K video's and created a proxy out of it. In
that Cinelerra session my memory usage became 9.9GB. When closing the project and reopening it the totally used memory reduced. What to make of this?
My observations: (1) Initial "Load" of a video shows the memory usage increasing while all of the occasional images show on the timeline. (2) While "Playing" that video, the memory usage increases gradually as each image is shown in the compositor. (3) Creating a "Proxy" of that video, the memory usage increases gradually. (4) When "Playing" this proxied video, the memory usage basically stays the same (does not increase), probably because creating proxy loaded everything. So, in all cases, the memory used is not released when the operation is complete because there is no reason to as it may be used shortly in playing or editing as you can see in the #4 above. Now when you quit out of Cinelerra and reload from backup, you are back to #1 above so memory usage will be less than #2, 3, or 4 because only memory usage of the "Load" is in effect since there has not yet been any "playing or editing". However, there is 1 anomaly that I believe shows that memory that should be released when switching between "Disable proxy" and "Enable proxy" is not being done properly. I have logged BT #607 for this to be looked at. Then an editing session with these files live should load the files
eventually, and cause the same memory usage. Personally I think it would be better to memory map files that are of interest. In that case the OS could choose where and when to put it into the main memory.
About the above statement, I am not sure how the OS would know which files to map "that are of interest" since how could it know? Generally, I don't even know which is going to be of interest to me. So as stated earlier, I believe that Cinelerra currently does not release memory used when the operation is complete because there is no way for it to know which areas are of interest to the user and will be used shortly in playing or editing.