View Single Post
Old 12-31-2021, 06:49 PM   #63
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,906
Karma: 6120478
Join Date: Nov 2009
Device: many
Hmm if epub import times still show a huge difference then something is fishy with your timings. On import with current master no file hashing is done at all. Perhaps some OS level file caching or something else on your system is impacting things.

You seem to misunderstand and think that these zip dates are real file modification dates but they only exist in the zip file. Sigil caches xhtml files and only flushes to real files when needed and but files are often opened for write which resets the actual file modification time. This is done to detect exactly external changes from OpenWith.

So Sigil has to remember them and that means using a key to store that info.

But you do not want that key to be based on file contents, nor the file relative path in the zip, nor even on the file name. The zip archive has no concept of files being renamed or moved. It stores its modification time based on zip entry (relative path in the zip).

You want it to set unpacked file mod dates and somehow have them survive opening for write (which is needed for how Sigil does file caching).

This is just not possible without major changes to how Sigil works. Changes I am not willing to make when Checkpointing and Compare already exists and is based in git and works just fine and can provide both files changed and internal change details.

To make your date changes work, open any epub, standardize and rename at will and save it as an epub to create a base set of modification dates in the epub zip.

So what I have in Sigil master now is all that I am willing to do. If you and others do not find it useful, I will remove it.

Just let me know if as it stands it is not useful. Comments on this versions usefulness from others welcome as well.


Quote:
Originally Posted by democrite View Post
Thank you for the plugin work.

Thanks too for the CRC32 change. Running just one file 5 times — the one with 6700 images — and then averaging, ~30% difference. If you wish for more benchmarks, I can try later. Unsure if you consider that difference significant. I also am not sure how I feel about not being able to rename file while keeping date. For the various reasons listed, renaming too I think should keep mod dates if the file is unmodded, e.g. I may merely rename all files to extension .xhtml, or make further renames. Sometimes they may make files change, such as if there links elsewhere, other times not.

For certain publishers, those that separate each chapters xhtml and images into folders, there could be multiple duplicates of some like shared images (e.g. graphical bullets), and in such cases, merging can take a long time, I haven't tested recently on new computer, though before it'd run overnight and not complete. I before have renamed such files outside Sigil. For that and other reasons mentioned, some dialog to perform rename, merge, and perhaps other operations where one can see first toc entry, possible header title, and maybe other metadata could be helpful someday.

I still really really would like any file that is not modified to not have the date changed. Perhaps you disagree, but for me, one might say it is merely the "right" thing to do.

Last edited by KevinH; 12-31-2021 at 09:10 PM.
KevinH is offline   Reply With Quote