06-14-2023, 03:43 PM | #16 | |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
If I had to guess (caveat: I am not a smart person) I'd say it was a race condition where the preview is still loading when the file is changed - the new page loads fine in code view while the preview is still working on the previous file. But I can't say for sure as yet. Here's a screenshot of an instance of it happening. It was willing to stay that was until something occurred to trigger the preview's refresh (i.e., typing, manually refreshing, etc). For the record, my PC is mid-range from 2020 and running off an NVME SSD, and the file from the screenshot is 229kb, so I don't think it's a performance issue. I'll try adding Sigil's directories to Defender's Exclusions list just to see if it changes anything. It's not a huge problem but I figured I'd bring it up while Preview was under scrutiny. Last edited by Vanguard3000; 06-14-2023 at 03:47 PM. |
|
06-14-2023, 03:48 PM | #17 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Oh! Okay, so here's something reproducible. If you split a file, Sigil automatically takes you to the new file (i.e. below/after the split). If you double-click the original file (above the split) it won't refresh.
(I realize this is getting further from OP's issue so if anyone has an issue with it, I'd be happy to make a new thread for this so things don't get too off-topic). |
Advert | |
|
06-14-2023, 04:23 PM | #18 | |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
06-14-2023, 05:10 PM | #19 |
Sigil Developer
Posts: 7,714
Karma: 5444398
Join Date: Nov 2009
Device: many
|
So after the split you double-clicked the original file in BookBrowser? Or did you just click on its open CodeView tab (assuming it was already open before the split)?
|
06-15-2023, 11:14 AM | #20 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
That's correct, although clicking on the tab seems to perform the same. It seems like maybe you're holding a "currentFile" variable somewhere for Preview that doesn't update when the file is split.
|
Advert | |
|
06-15-2023, 04:12 PM | #21 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I still can't get it to happen with any consistency.
EDIT: it just happened to me while editing the single xhtml file in Sigil's default EPUB2. Last edited by DiapDealer; 06-15-2023 at 04:15 PM. |
06-15-2023, 07:22 PM | #22 |
Sigil Developer
Posts: 7,714
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Preview does use cached file contents so that it will always show the last xhtml edited page from CodeView even though you have opened a css file. So you can see changes when css changes.
I can certainly try flushing that cached file content when a split at markers is done. |
06-15-2023, 08:32 PM | #23 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
My Issue might be something completely different. I've had it happen when not splitting. Just editing. But mine always seems to manifest as a stuck "Loading..." overlay.
|
06-15-2023, 11:40 PM | #24 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Just to clarify, I see this issue when using the "Split at Cursor" button, not the "Split at Markers" function. It may be the same stuff under the hood, but I just tried inserting a marker and using Split at Markers and didn't see the issue.
|
06-16-2023, 03:39 AM | #25 |
Member
Posts: 17
Karma: 10
Join Date: Nov 2019
Device: Pocketbook InkPad Color 3
|
For anyone else interested in testing the page preview refresh times, here is a "borkified" version of the book that i've been working on:
https://1drv.ms/u/s!Ano7p-K16N1ojI9w...OZy2Q?e=5qtHdH Please try the preview and see how fast is it on your machines. Try especially editing the Chapter 12 file, it gives me the worst preview loading time (3-4 sec.) |
06-16-2023, 07:52 AM | #26 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm clocking in at 1 to 1.5 seconds (including the resync to position when editing in the middle of the file) on Chapter 12. This is on an older i3 2.4Ghz dual-core laptop with 16Gb of RAM (Windows 10). Even enabling misspelling highlighting in Sigil preferences doesn't significantly affect my refresh time (and borkify creates a lot of misspellings to highlight!)
Last edited by DiapDealer; 06-16-2023 at 08:44 AM. |
06-16-2023, 08:16 AM | #27 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can confirm that Preview doesn't update when double-clicking the original file (in Book Browser) after a Split at Cursor (at least on Windows). Preview continues to show the contents of the new file created by the split. Clicking anywhere in the original file in Code View seems to be enough to trigger the refresh/resync for me.
|
06-16-2023, 08:29 AM | #28 |
Grand Sorcerer
Posts: 27,588
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Correction: clicking anywhere in the original file in Code View that would require Preview to scroll will trigger the refresh/resync for me. Anywhere above that point will keep Preview showing the content from the previous file.
|
06-17-2023, 08:46 PM | #29 |
Sigil Developer
Posts: 7,714
Karma: 5444398
Join Date: Nov 2009
Device: many
|
Thanks to your reproducible test case this should now be fixed in master.
|
06-17-2023, 08:56 PM | #30 | |
Sigil Developer
Posts: 7,714
Karma: 5444398
Join Date: Nov 2009
Device: many
|
@SilverGreen93
Quote:
My guess is something you have added on your machine is trying to scan each file being loaded by Sigil and it is really slowing things down. Are you sure you are using the very very latest Sigil-1.9.30? Are you by any chance launching Sigil using Calibre's open with? If so, that is known to interfere with and cause problems for both Sigil and Calibre. Other than that I am out of ideas. I will take a look at how much work it would be to temporarily pause updates until a manual reload is done. If easy, I will keep it in mind for a future release (but probably not the next one). Sorry I can't be more help. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Auto-Merge Duplicates when (auto) Adding Books | brady601 | Library Management | 4 | 02-13-2023 09:29 AM |
Auto-hyphenation in Preview Panel? | Notjohn | Sigil | 9 | 05-28-2017 02:42 PM |
preview vs print preview | isalherbo | Sigil | 7 | 04-23-2013 03:52 PM |
Is this possible: Auto-add book/magazine then auto e-mail to device? | runningwithbulls | Library Management | 5 | 09-10-2012 12:27 PM |
Refreshing Calibre? | Devon | Calibre | 7 | 11-19-2009 08:12 PM |