Hello,
the database appears like a single file but it is not. It is in fact an index file and a data file stored in a same file using internal an Windows mechanism. But access to these two files is really done separately as if it was two separate files.
The index file is loaded in memory at the startup of cam2pc once for all. The data file is kept open to allow faster access. I have spent a lot of time tuning this stuff trying all kinds of tweaks and I can ensure you that it is today as fast as it can be.
I also think that it is pretty stable : cam2pc can even crash without corrupting that database. Data is only appended to the data file and the index file is written in a temp file before being copied in the "archive". The only time the DB can get corrupted is during this copy to the archive which should be pretty fast.
I do not wish to split that database in all directories because I think this heavily pollutes the user's PC. Plus I do not think it would make things that faster as it would require to open the index/data files each time a directory is opened.
When you browse a folder, cam2pc is frozen just the time to list all the files of the folder, get their basic characteristics (size, creation date...). After that a separate thread is launched that is supposed to get the thumbnails from the database and update the thumbnail view. During this thumbnail refresh, cam2pc is not supposed to be frozen at all. If this is the case then it is an issue. However this never happened on my PC's so it may be hard to fix.
I admit that I did not test cam2pc with so many pictures especially that many (2000 for masterjp) in the same directory. My database contains around 5000 pictures...
I currently have one possible solution to replace the database with something else (
http://www.sqlite.org). I have made preliminary tests on a small amount of data and there was not much difference, cam2pc being a bit faster as it is 100% designed to store thumbnails. I would have to go further and see if any performance difference can be seen with huge databases as the ones you have. In that case, a switch to SQLite can be done.
One thing is sure is that there is no short term solution to this. If you can stand it, you can try to disable thumbnail caching and let cam2pc recreate the thumbnails each time you browse a directory. It will surely be faster that what you have now!
Regards,
nabocorp
PS: cam2pc is not entitled on nabocorp's website as the fastest picture browser. It may be said so on other websites but we cannot control that!