I did some additional research on the random access flag and decided to remove it from the thumbnails reader since that file can grow too large for letting Windows cache it.
We don't use the random access flag often, so it was used intentionally where ever it is used, and the only remaining place now is the actual library database files, which are several orders of magnitude smaller then the thumbnails cache, and performance on these is very important, so those are keeping it.
Hi Hendrik.
I would like to check this with a trial version.
I can imagine that a buffer holding the image data may still be required.
I see relatively simple possibilities for optimization, each of which can bring about an improvement.
a) The reading process, which reads only a few bytes for each thumbnail, is in fact the construction of an index. If you save this index, you don't have to build it from scratch every time.
b) During this reading process, the data are read in ascending order. The JMD file should be opened correctly with FILE_FLAG_SEQUENTIAL_SCAN. Windows can thus increase the throughput through read ahead and, above all, discard the part that has already been read from the buffer.
In a second run, MC then only requests the thumbnails actually required in the view. If we open the file with FILE_FLAG_RANDOM_ACCESS and are lucky, Windows can then keep it in RAM.
If we don't want to rely on luck, we read the required data in ascending order and let Windows optimize the data throughput with FILE_FLAG_SEQUENTIAL_SCAN.
The read data does not remain in the RAM. It is then up to the application to buffer the required thumbnails. But as shown, a few MB are sufficient for this.