Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2019, 02:07 PM   #1
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Bug: Report Split Unsaved Filesize

See attached EPUB.

I copied/pasted 2 lorem ipsums and added a split marker in the halfway point.

Version: Sigil 0.9.13
OS: Windows 10 (1809)

Steps to Reproduce Bug

1. Tools > Reports > HTML Files. You should see Part1.xhtml as ~63 KBs.

2. Go back to Code View and Split at Markers (F6).

3. Refresh the Report.

You'll see Part1.xhtml is ~63 KBs while Part1_0001.xhtml is .01 KBs.

Expected to see both files ~31.5 KBs.

After saving and run/refresh the report again, the file size adjusts fine.

PS. Never ran across this before because I constantly press Ctrl+S like a fiend, so never have unsaved EPUBs. :P
Attached Files
File Type: epub LoremIpsum.epub (11.1 KB, 104 views)
Tex2002ans is offline   Reply With Quote
Old 04-03-2019, 02:28 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I seriously never expected that so many people would leave the reports dialog open while making changes to the underlying files. It's too late to change it now, of course, but if I had my way, Reports would be a modal widget. But alas ...

... we'll look into it.
DiapDealer is offline   Reply With Quote
Advert
Old 04-03-2019, 02:31 PM   #3
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes the report feature is directly tied to the state of the files on the disk when the report was first generated.

So the split happened and both tabs are correct. If need be verify that by opening the new tab in a CodeView tab. The new file contents are not actually written to the disk until it actually needs to be. In other words, not until a save is done, a plugin is run, etc.

This is how Sigil has always worked, otherwise opening up large epubs would be even more time consuming than they are now. The contents of the files are held in Resource Widget caches and only written to disk when needed. For speed these disk files before updating are often just placeholder text.


This is done to speed up loading of files and other things, as writing to disk can be slow

Last edited by KevinH; 04-03-2019 at 02:33 PM.
KevinH is offline   Reply With Quote
Old 04-03-2019, 02:32 PM   #4
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
We could modify the refresh tab on Reports to flush all caches to disk at the expense of speed.
KevinH is offline   Reply With Quote
Old 04-03-2019, 02:53 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by DiapDealer View Post
I seriously never expected that so many people would leave the reports dialog open while making changes to the underlying files.
I was working on a book with an extra large chapter (~440 KBs) that I wanted to split + I wanted to make sure I chose a subheading that was ~halfway filesize.
Tex2002ans is offline   Reply With Quote
Advert
Old 04-03-2019, 03:07 PM   #6
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
To "fix" this, in MainWindow in "ReportsDialog()" we would have to do the following immediately after the call to SaveTabData() to force everything to disk.

Code:
    m_Book->GetFolderKeeper()->SuspendWatchingResources();
    m_Book->SaveAllResourcesToDisk();
    m_Book->GetFolderKeeper()->ResumeWatchingResources();
This will take the time to force all changes to be actually written back to the disk.
KevinH is offline   Reply With Quote
Old 04-04-2019, 10:18 AM   #7
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
I am going to add this in because if we bother to collect file size info, it should be correct.
I will push this fix to master.

Thank you for your bug report!

KevinH

ps: just pushed. This fix will be in the next release.

Last edited by KevinH; 04-04-2019 at 10:25 AM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to report a bug osmin Calibre 4 06-20-2017 05:56 PM
Bug report mtravellerh PocketBook 303 11-03-2013 07:21 PM
Glo Bug or common, quote split from word? Ripplinger Kobo Reader 4 07-05-2013 08:38 PM
How to report a bug??? tmlee51 Calibre 2 02-14-2012 11:07 PM
split function bug ? cybmole Sigil 6 01-13-2011 12:05 PM


All times are GMT -4. The time now is 03:20 AM.


MobileRead.com is a privately owned, operated and funded community.