View Single Post
Old 01-23-2018, 06:28 AM   #16
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by kovidgoyal View Post
Renaming files is pretty fast, it shouldn't really bottleneck things (it works by hard linking and then deleting the originals, in a transactional manner). And as theducks said, updating the database is of no consequence, since it only needs to update a single row for a case change.
But it also updates all the opf files.
And when you are on an SSD, you only watch helplessly as your disk blocks are getting rewritten again and again and AGAIN when you correct the author name back.

One memory cell on an SSD with MLC can only be rewritten 7000 times before it fails. This is a very large number, especially with all wear leveling routines build into each modern SSD.
For a typical consumer-level SSD nowadays, with TLC nand memory cells the number of rewrites is significantly lower, and is amplified by the fact that you can not delete (rewrite) an individual memory cell, you have to delete the entire block of cells.

It is difficult to know precise numbers, because they are not advertised by manufacturers. Some manufacturers (Kingston, I think) will not even tell you what kind of memory cell is in your SSD.

So, every time I see Calibre to import a book with differently capitalized author name I cringe. It might mean that quite a lot of files have to be renamed and many opf files written from the scratch. I know that a file or a directory name rewrite is a change of a few bytes, but the entire block of NAND memory cells on my SSD will have to be zeroed by a TRIM for a smallest change. And the individual opf files and file names are usually scattered all over the place and not in a small consecutive block.
kacir is offline   Reply With Quote