![]() |
#16 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,210
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For me, I do use one file on occasion. For the most part, when I am editing/cleaning up an Gutenberg sourced epub. Their habit of splitting on file size instead of chapter boundaries makes it easier to merge all the HTML files into a single file and then splitting it on chapter boundaries. Operations on that single file are noticeably slow but that's a temporary condition.
|
![]() |
![]() |
![]() |
#17 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Or, maybe the "Samsung optimized mode" tweaks the video driver, IIRC there were/are video driver issues in some versions of Qt.
BR |
![]() |
![]() |
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,571
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#19 | |||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
But the more serious tweak "Power Saver" does is downclocking/throttling more aggressively (especially when on battery). I was doing a few searches to try to figure out what "Samsung Optimized Power" mode does: http://forum.notebookreview.com/thre...lanced.752592/ Quote:
"What causes Windows to freeze for no apparent reason?" NotebookReview Forum: "Anyone here have the NP550P7C 17"?" where users were also having trouble with Samsung's power mode. Now... why it hapens on Sigil 1.5.1 and not 1.4.3... unsure. But I'm still suspecting it has to do with with Samsung's throttling. Question to repilo: Is this happening while on battery? Or is it happening when plugged in too? And did that "Balanced" power mode solve the freezing issue now for Sigil 1.5.1? Does this happen in anything else on your computer? For example, watching a high resolution video on Youtube? Or opening up a very large document in Word/LibreOffice? Quote:
If I remember correctly, if you open super large HTML file:
Note: Although I haven't really messed with large single files in a while... But when I do, I always do my cleanup/splitting in Calibre first. Once it's in bite-sized chunks, then I vastly prefer Sigil. Quote:
For example, merging together a Gutenberg mess or importing a Word "Save As HTML". You initially have your huge file, then do your splitting. But if that initial import is brutal, and Sigil is stuttering/freezing up... it makes it frustrating even if you knew what a subset of the underlying problem was (View > Preview (F10)). * * * Artificial Test Case Take any reasonably large EPUB (>1MB), merge into a single HTML file, then poke away at Code View/Preview. Here's a great example of a 3.9 MB EPUB (~1.4 million words): "The Complete Libertarian Forum" I just tested Sigil 1.5.1 in my VM: 1. Merged all chapters in the EPUB into "Chapter1.html". 2. Clicking View (or anywhere else) instantly froze up Sigil for a while. 3. Once the menu finally opened, even moving the mouse or hovering over menu items caused a huge delay + Sigil (Not Responding). Clicking or doing anything froze it up for another many seconds. Calibre's Editor handles that type of "monolithic mess" at full-speed. * * * Side Note: I also believe this happens when:
Where Calibre copies/pastes in a second (may have to do with syntax highlighting + previewing in a separate thread?)... Sigil completely chugs. I also think that EPUB's a brutal case to test merging lots of files together + updating all the internal links. Here were my rough timings: Calibre: ~2 seconds to merge all files. Instantly able to edit. Sigil: ~60 seconds to merge all files. ~45 more seconds until Code View was even scrollable/clickable. (Preview was closed. Didn't retest with Preview open.) Last edited by Tex2002ans; 04-08-2021 at 09:38 PM. |
|||||
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I am curious ... is the fast time for calibre to merge, is that done with Preview actively showing the file being merged into, or a different file, or is that with the Preview updating message showing?
A second thread just to load Preview is doable but seems like overkill. But waiting for Preview to load could be handled more asynchronously, as long as it does not interfere with syncing from Preview back to CodeView. I assume calibre is using multiple threads to handle the merging as well. That might make some sense to look into. |
![]() |
![]() |
![]() |
#21 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
I just tested Calibre again, and it looks like it does this: 1. Preview is generated. 2. Keep "Chapter1.html" open as the active tab. 3. Shift-click + highlight all chapter files. Right-Click > "Merge selected text files" Select Chapter1.html bullet. 4. It looks like preview window still keeps the old Chapter1 preview cache (?) displaying there. 5. The instant you click within Code View, the preview window kicks into "Loading preview, please wait..." and takes ~6 seconds to generate a new one. But as I said, the entire time, you're able to edit code, open up menus, etc. etc. all at full-speed. Sigil, at that point, every single thing you click on or do became a slog. Also, as I was typing my post above (~30 mins), I noticed when I clicked back into the merged Sigil window, the entire window re-froze up and went back to "Not Responding" for maybe ~15 seconds. (Preview not open.) Quote:
![]() ![]() Last edited by Tex2002ans; 04-08-2021 at 11:31 PM. |
||
![]() |
![]() |
![]() |
#22 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
One last question since I do not use calibre ... does clicking in their Preview make CodeView sync to the same place and visa-versa like Sigil does? And if so, what happens if you try to sync from Preview to CodeView when Preview is cached during the merge time window, before the updating message comes up?
|
![]() |
![]() |
![]() |
#23 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Also does calibre properly test all files to be merged to check if well-formed *before* starting the merge and giving you a chance to abort before the merge? Does it check for duplicate or missing url fragments in all files and give you a chance to abort before starting the merge?
Right now Sigil is checking for well-formed before, during, and after which seems to be a bit of overkill since testing just before should be enough. That should make for a simple speedup. |
![]() |
![]() |
![]() |
#24 | |||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
A click in Preview jumps you to exact location in Code View. Side Note: Calibre also has 2 helpful buttons below Preview:
(I have whatever the defaults are... both of those buttons are off.) Quote:
When you: 1. Merge 2. Press into Code View. Preview says "Loading preview, please wait..." for a few seconds. Everything works great and is responsive the entire time. When you: 1. Merge 2. Press into Preview. Calibre stuttered a little bit. When I tried to scroll or click around in Preview, it wouldn't work, and neither would Code View (or the entire Calibre window). But within ~6 seconds, it recreated another Preview and everything was back to normal. Quote:
I went into Chapter2.html and busted one of the tables by removing the closing </tr></table>: Spoiler:
and Calibre's merge silently "corrected" + shoved it at the very end of "Chapter2.html"'s code: Spoiler:
so in the final merge, you had: - Chapter1's HTML - Chapter2's HTML --- With busted <table> removed from location, placed at end before Chapter3, and corrected. - Chapter3's HTML Quote:
Like I gave it 3 chapters with the same: Code:
<p class="footnote"><a href="#ft.ast1" id="fn.ast1">[*]</a> [...] </p> Code:
<p class="footnote"><a href="#ft.ast1" id="fn.ast1">[*]</a> [...] </p> <p class="footnote"><a href="#ft.ast1_1" id="fn.ast1_1">[*]</a> [...] </p> <p class="footnote"><a href="#ft.ast1_2" id="fn.ast1_2">[*]</a> [...] </p> And on non-existent/duplicate IDs. No, Calibre doesn't warn about those on merge. It only warns about them when you Tools > Check Book (F7) (similar to an epubcheck) or look in the Reports. Quote:
![]() Last edited by Tex2002ans; 04-08-2021 at 11:17 PM. |
|||||
![]() |
![]() |
![]() |
#25 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Okay I have Preview being loaded asynchronously in my local tree which helps but the bulk of the time is spent in merge pre-validating xhtml is well formed and that ids are valid.
If we skip those checks (for the time being only) and let gumbo fix things if needed and use multiple threads to update and extract the pieces to be merged, I can cut down that merge time significantly. But that is a bruiser of a test case once merged. It has over 40,000 lines of html code. We synchronously wait for syntax highlighting to be done on purpose to better keep track of actual editing changes vs xhtml syntax colouring changes. Not sure I want to change that given how rare extreme cases like this are and they should be immediately split so should be short lived issues. Last edited by KevinH; 04-09-2021 at 09:48 AM. |
![]() |
![]() |
![]() |
#26 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,571
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm testing a few things that @Tex2002ans described, and I can verify the long periods when Sigil is unresponsive after merging a bunch of files together in the test epub he mentioned above. Many of them I would expect, but the UI interface freezing in general (after the merge is done) seem odd to me (as well as unique unique to Windows, in my experience).
All of my experiments/observations were done with the Preview window closed, with Sigil and it's various files/folders exempt from Windows Antimalware, and with no Power Management restrictions to contend with. The merge of the 60(ish) chapters itself took well over a minute (i3 8Gb RAM). During that time, processor/ram/disk/gpu usage was not particularly high (both cumulatively--for all processes--and for Sigil specifically). One notable thing is that the Windows 10 task manager indicates that power consumption is "very high" during the merge process. The progress indicator for the merge job immediately jumps to 98% and then Sigil becomes unresponsive for over a minute until the merge is complete. After the merge is complete, the UI is unresponsive for a shorter period of time, but lengthy nonetheless. To make matters worse, any Window that covers the Sigil window even briefly (including the task manager which frustrates testing) starts the unresponsiveness of Sigil's UI all over again. From thins point on, I can't really say what might trigger another round of ui unresponsiveness (with the exception of Sigil's window being occluded by another app) when trying to open menus or preferences, but when it happens, the length of time is the same. During the unresponsive periods, Sigil's processor and memory usage spike a bit (but nothing drastic, and not nearly enough to interfere with the running of other applications) and the power consumption indicator immediately spikes to "very high". The gpu % never moves from 0% for Sigil during any of my testing. With Preview closed and no editing being done, I guess I'm not certain why these lengthy periods of UI/menu unresponsiveness are still happening? I get the merge itself being intensive, but once done, why does Sigil not become more responsive when no editing, or rendering is being done? Granted... this is all with the monolithic html tab open that I rarely deal with (by choice) myself, but it would seem that Sigil's Windows performance in general might be improved if we could eliminate some (seemingly) unnecessary reparsing, EDIT: Just to clarify, this is in no way new to Sigil 1.5.1. Last edited by DiapDealer; 04-09-2021 at 12:05 PM. |
![]() |
![]() |
![]() |
#27 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Okay, I have looked into this further. With that testcase merging *all* subsequent chapters into Chapter one.
- a bunch of time verifying all xhtml is wellformed - a bunch if time verifying no ids are undefined ignoring those for now, the rest of the time is split up in 4 pieces - doing the actual merge itself 2 seconds - deleting all of the resources that was merged about 30 seconds - updating all other links in non-merged files and the ncx, about a second The remaining time is spent loading CodeView with the merged file (fast) and then CV running its synchronized syntax highlighting which includes completely spell checking the entire document and then loading Preview (fast since now asynchronous in my local build). So if you use Preferences to turn off spellchecking in CodeView (no highlighting) you see a huge speedup. So could someone turn off Preview, and turn off CV spellchecking in Preferences, and try timing that merge testcase again? How much improvement did you get? |
![]() |
![]() |
![]() |
#28 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
As for the time to delete the now merged resources, it takes a long time because it requires parsing the opf, updating the manifest, spine, guide, and any nav landmarks (so parsing and recreating the nav each time too), then rebuilding the opf and saving it each time repeated for over 100 resources.
Only the merge case would require deleting so many resources at once, so it was designed for single use and safety not speed. I will look into adding a bulk removal routine to save some time. |
![]() |
![]() |
![]() |
#29 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,571
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Do you have any thoughts as to what is being (re)triggered when clicking on a menu item after everything has completely settled down after the merge and the CV reload? It seems like something is being unnecessarily "redone" at that point. All is quiet and done and then clicking any menu item triggers another lengthy freeze. I can't even get the preferences dialog to fully load after the merge is complete. The widget is blank white, the cursor will spin for a minute or so (titlebar says "not responding") then it will "reset" (for lack of a better word), but soon go back to not responding. Lather,rinse, repeat for about 5 minutes now, and still the Preferences dialog has not rendered anything. EDIT: after about 8 full minutes, the Preferences dialog finally rendered and everything settled down. I'll try to get some tests done with spellcheck disabled. Last edited by DiapDealer; 04-09-2021 at 02:13 PM. |
|
![]() |
![]() |
![]() |
#30 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,571
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Bad news: turns out spellchecking in Code View was already disabled.
![]() The same cycle of the Preferences dialog repeatedly doing something for 8 minutes or so before finally rendering happens every time (at least while the new monolithic merged html tab is the one active) after the merge is complete. Sigil debug logging is disabled, by the by. I learned my lesson on that when testing Sigil performance issues on Windows ![]() Last edited by DiapDealer; 04-09-2021 at 02:11 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil 0.5.3 extremely slow to reflect changes | yotzeret | Sigil | 4 | 08-16-2012 06:10 AM |
computer upgrade for slow calibre | myday | Devices | 16 | 08-17-2011 06:26 PM |
Sigil on Lion So Slow | mhikl | Sigil | 10 | 07-24-2011 10:55 PM |
I need help with a slow computer | Nate the great | Lounge | 24 | 08-29-2010 02:27 PM |
Sigil 1.6 - deleting blank line very slow | lol | Sigil | 2 | 12-24-2009 11:54 AM |