[CinCV TNG] [PATCH] Cache all BC_Hash values (configuration defaults)

Einar Rünkaru einarrunkaru at gmail.com
Sun Nov 13 20:31:10 CET 2016



On 11/12/2016 09:44 PM, Petter Reinholdtsen wrote:
> [Einar Rünkaru]
>> Values are kept in memory and saved when program exits.
>> Avoids saving BC_Hash values to disk at arbitary times.
>> Small speedup, less wear of disk.
>
> Sound like a good idea.
>
> But what is the effect on data integrity on disk if the program or the
> machine crash before the program exits in a controlled fasion?  Perhaps
> the values should be flushed to disk once in a while (for example every
> 30 seconds)?

It was 20 years ago when a very good program crashed only 3 times a day. 
Before that time it was abnormal and today even programs you can buy for 
money don't crash. One should not expect that something is saved after 
crash. Today crashes are rare, no need to be prepared for them.

Modern SSD disks have limited amount of data can be written and the idea 
is not to write to disk anything because we just can.

>
> Do you have any measurements on memory usage for this cache in a normal
> edition session?
>

About 50k.

Retesting the patch revealed need for change the patch. Destructor is 
needed because if BCHash is created without filename, it is better to 
remove it asap.

Fixed patch is attached.

Einar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Cache-all-BC_Hash-values-configuration-defaults.patch
Type: text/x-patch
Size: 23444 bytes
Desc: not available
URL: <http://lists.cinelerra-cv.org/pipermail/cinelerra/attachments/20161113/3c552315/attachment.bin>


More information about the Cinelerra mailing list