Results of test including booting.
Test sequence: empty the plugin data table. Do twice: boot & wait for quiescence. Start calibre, push dup check button. Stop calibre.
The test is three times faster with the cache than without it.
Code:
First run. Requires hashing all books.
Starting up...
Started up in 2.7619998455
Pass 1: 2100 formats created 1 size collisions
Analysed 50 after 1.2009999752
Analysed 100 after 2.23099994659
Analysed 150 after 3.25999999046
...
Analysed 2000 after 44.8190000057
Analysed 2050 after 45.9270000458
Analysed 2100 after 47.4549999237
Completed duplicate analysis in: 70.2000000477
Found 0 duplicate groups covering 0 books
Second run. No books are hashed.
Started up in 2.77799987793
Pass 1: 2100 formats created 1 size collisions
Analysed 50 after 0.202000141144
Analysed 100 after 0.202000141144
Analysed 150 after 0.202000141144
...
Analysed 2000 after 0.249000072479
Analysed 2050 after 0.249000072479
Analysed 2100 after 0.249000072479
Completed duplicate analysis in: 23.368999958
Found 0 duplicate groups covering 0 books
It seems that the stat() time for these 2100 formats is 23 seconds, or around 11 MS/book. The hash time is around 23 MS/book. Cache hits are basically free, regardless of the number of books.