MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Sigil 1.4.x GUI locking (https://www.mobileread.com/forums/showthread.php?t=336081)

GerardE 12-31-2020 07:44 AM

Sigil 1.4.x GUI locking
 
I'm having an issue with all the version of Sigil 1.4.x on Windows 10 Professional.

Whenever I load an epub the GUI locks/hangs on every mouse click and takes around 15-20 second util another mouse click can be made. This has made using the app almost impossible and I've been forced to downgrade to v1.3.

Can anyone suggest any steps I can take to debug this problem, as I'd prefer to find a solution rather than simply complain.

Thanks :)

DiapDealer 12-31-2020 09:39 AM

There really are very few things different about 1.3 vs 1.4.x that I would expect to cause problems like you are experiencing. They all use the exact same build of Qt5.12.9 and Python 3.8.3, for instance.

And we know it's nothing inherent to either Sigil 1.4.3 (don't bother trying to install 1.4.0-2) or Windows 10. I compile and test Sigil on Win10 Pro (latest updates) and experience no such issues. As do countless others using the same formula.

Please verify the following:
1) You're opening Sigil as a standalone app and not via calibre's Open With (built-in feature or plugin)

2) the issue presented itself with every single epub you opened.

3) the issue presented itself when launching Sigil without an epub (the default empty epub you get when double-clicking the Sigil desktop icon).

Something you could try would be to back-up your Sigil preferences folder somewhere else, then delete it from its regular location and then install Sigil 1.4.3 and let it recreate the default preferences (just like a fresh install) when it's launched the first time.

KevinH 12-31-2020 12:41 PM

Or is this another example of opening a single huge html file?

BTW: Where are all of these single huge html files coming from? The only thing that generates them from my understanding is unpacking an old old mobi6. Is there something else that seems to think a single huge html file is some sort of format?

DiapDealer 12-31-2020 01:45 PM

Quote:

Originally Posted by KevinH (Post 4075945)
Or is this another example of opening a single huge html file?

It's possible. That's why I asked about "every single epub" and the default empty epub above. But even if it IS down to epubs comprised of single huge html files, what is it about 1.4.x that seems to exacerbate the problem (since rolling back to 1.3.0 seemed to "fix" the OP's problem)?

I've tested with large novels comprised of single html files on Windows 10 and while Sigil 1.4.3's performance definitely starts getting sluggish (with Preview Open), I don't experience anywhere near the 15-20 (and even 30-60) "hangs" others have described. The performance hit I experience with the single huge html files in 1.4.3 are comparable to the performance hit those kinds of epubs have always caused Sigil. No Sigil version since the switch to QtWebEngine has been any worse in that regard on any of my own Windows machines (real or virtual).

Quote:

Originally Posted by KevinH (Post 4075945)
BTW: Where are all of these single huge html files coming from? The only thing that generates them from my understanding is unpacking an old old mobi6. Is there something else that seems to think a single huge html file is some sort of format?

Not sure. Conversions from giant Word documents could also result in one giant html file. My own DOCXImport plugin leaves it up to the user to properly split the html. Many neophytes might not see the need to split up the result of using Export to HTML from a Word novel. *shrug*

DNSB 12-31-2020 04:27 PM

Quote:

Originally Posted by KevinH (Post 4075945)
Or is this another example of opening a single huge html file?

BTW: Where are all of these single huge html files coming from? The only thing that generates them from my understanding is unpacking an old old mobi6. Is there something else that seems to think a single huge html file is some sort of format?

I've found quite a few indie published KF8 format ebooks that unpack to a single HTML file. I've developed the habit of running the Quality Check plugin's oversized html file check on newly imported books before I start my metadata update/cleanup/etc. work flow.

theducks 01-04-2021 12:47 PM

Quote:

Originally Posted by DNSB (Post 4076020)
I've found quite a few indie published KF8 format ebooks that unpack to a single HTML file. I've developed the habit of running the Quality Check plugin's oversized html file check on newly imported books before I start my metadata update/cleanup/etc. work flow.

Same here: Amazon books from some Indies. One huge main content file with a tiny frontmatter file (and maybe a backmatter one).

Just read here at MR and you will see all the posts by those who think you can only do a decent 'book edit' if you work on a single file. :rolleyes:

brent63 02-23-2021 11:23 AM

I am also having slow response time when I click to edit text after finding what I want in the Preview panel/window.

The file size is only 875kb, however I do use Open Office to do most of my major typing. I then either save then file as an HTML and add that file into an existing sigil epub. or if I'm doing a major edit in an existing file I use PageEdit to open the file, cut and paste the text into OO then cut and paste it back into PageEdit, (please add popup to paste as plain text when using CtrlV) I then save PageEdit into Sigil.

I have read that Quality Check can look at file size. So I have downloaded Quality Check, however I can not get it to load into Sigil. I'm hoping you won't tell me I have to download additional software in order to get it to work.

Thank you
Brent

KevinH 02-23-2021 11:28 AM

On Windows, Linux, Or Mac?
What happens if you run Mend and Prettify on the CodeView? Does editing speed improve?

And for what it is worth, copying and pasting large amounts of text from OpenOffice or Word into PageEdit just to get it into Sigil is probably not a very good idea. There are plugins that can help you import Word/OpenOffice files directly into Sigil and Calibre is said to do a good job at that as well.

brent63 02-23-2021 11:47 AM

Windows 10.

It cut the delay time down significantly.

I do run that command a lot as some edits come in not 'double spaced' or 'first line indented'. I have also seen it pop up when I save a file if it is not formatted correctly.

Is it automatically run when a file is first opened?

Thank you
Brent

DiapDealer 02-23-2021 12:08 PM

No. Prettify is a strictly manual process. In your case, I'd wager to say the the file size isn't all that relevant to the slowdowns you're experiencing. It sounds to me like the html you're pasting into Sigil has no (or very, very few) line endings in it. One giant line of html code with no line endings is the number one thing that can cause severe slowdowns when editing within Sigil. If whatever you use to create/export your html creates a file with no line endings, that would explain the slowness.

brent63 02-23-2021 12:09 PM

I'm sorry, but ran it on wrong file.

I'm using Windows 10 and still having long delays, it even happens when I try to minimize the Sigil window.

I have run the Well Formed Check EPUB; and I have no errors.

I also ran the Validate Stylesheets; and have no errors

There are no Unused Media files or Stylesheet classes.

Thanks
Brent

DiapDealer 02-23-2021 12:12 PM

Run Mend and Prettify on all html files. Prettify will add the line endings.

brent63 02-23-2021 12:12 PM

When you speak of line endings, are you talking about "/p"?

DiapDealer 02-23-2021 12:23 PM

No. Line endings are invisible characters. I'm talking about line-feeds and carriage returns.

brent63 02-23-2021 01:17 PM

As I do not see them in the editor, how do I go about removing them?

DNSB 02-23-2021 01:26 PM

Quote:

Originally Posted by brent63 (Post 4096431)
As I do not see them in the editor, how do I go about removing them?

We are wanting to add them not remove them. Under the Tools menu, hover on Reformat HTML and then click on Mend and Prettify All HTML files.

Spoiler:

Code:

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"><head><title>Lorem Ipsum Test</title>  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css"/></head><body class="blah"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque viverra lacus ut metus eleifend scelerisque. Nunc blandit id enim nec pulvinar. Sed quis sodales justo. Nam interdum elementum fermentum. Duis at gravida justo, ac lacinia risus. Vivamus ac nibh facilisis risus pellentesque varius tempor eu lectus. Morbi tempor nunc sit amet fringilla posuere. Morbi finibus magna a sodales interdum. Morbi at vulputate magna. Donec venenatis diam ut arcu elementum, nec egestas purus euismod. Sed vitae orci tincidunt, ullamcorper nunc id, aliquet dolor. Nulla faucibus venenatis magna sagittis fringilla. Integer ligula turpis, venenatis et efficitur ac, lacinia sit amet magna. Cras viverra dui eu lectus pellentesque bibendum at non leo.</p><<h1 class="header" id="toc_2">Welcome part 2</h1><p>Aenean suscipit enim id est fringilla, eget eleifend tortor suscipit. Ut sit amet dui eget tortor iaculis scelerisque ac et felis. Fusce orci libero, elementum quis ex aliquet, dapibus luctus orci. Morbi diam neque, fringilla eget sem at, scelerisque laoreet neque. In hac habitasse platea dictumst. Donec vehicula pellentesque consectetur. Cras eget mollis lorem, eu sodales nunc.</p>enenatis magna, sed pellentesque augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris commodo finibus gravida. Donec facilisis sed ex sit amet tincidunt.</p></body></html>



If your file looks like the above sample with all the lines munged together, that is what mend and prettify will help with giving you something like the code below.

Spoiler:
Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Lorem Ipsum Test</title>
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body class="blah">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque viverra lacus ut metus eleifend scelerisque. Nunc blandit id enim nec pulvinar. Sed quis sodales justo. Nam interdum elementum fermentum. Duis at gravida justo, ac lacinia risus. Vivamus ac nibh facilisis risus pellentesque varius tempor eu lectus. Morbi tempor nunc sit amet fringilla posuere. Morbi finibus magna a sodales interdum. Morbi at vulputate magna. Donec venenatis diam ut arcu elementum, nec egestas purus euismod. Sed vitae orci tincidunt, ullamcorper nunc id, aliquet dolor. Nulla faucibus venenatis magna sagittis fringilla. Integer ligula turpis, venenatis et efficitur ac, lacinia sit amet magna. Cras viverra dui eu lectus pellentesque bibendum at non leo.</p>


<h1 class="header" id="toc_1">Welcome</h1>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tristique eleifend odio vel accumsan. In purus massa, efficitur nec gravida id, efficitur et lorem. Ut odio magna, maximus non ex eget, vulputate finibus urna. Aenean dignissim nisi ut ex euismod faucibus. Etiam hendrerit suscipit aliquet. Donec efficitur eros ac nibh fringilla feugiat. Integer gravida leo sodales, venenatis velit eu, porttitor purus. Duis vel lacus nec leo placerat fringilla. Proin tellus enim, rutrum et molestie eget, pretium a lacus.</p>

<p>Praesent at odio nulla. Proin interdum luctus odio, sit amet fringilla velit luctus et. Integer ut finibus neque. Vivamus sagittis, massa quis aliquam mattis, sem ipsum dapibus tellus, laoreet ultricies quam diam vel ipsum. Vestibulum in mi a mi fermentum luctus non sit amet mauris. Nullam in justo neque. In bibendum sagittis elit, quis aliquam urna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc vitae lectus vitae massa semper cursus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam nulla orci, suscipit at placerat quis, pharetra in massa. Donec eu est fermentum, condimentum tortor at, aliquam est.</p>


<h1 class="header" id="toc_2">Welcome part 2</h1>


<p>Quisque vitae orci semper, dignissim mi eu, vehicula justo. Sed vel nisl et tortor imperdiet sodales. Nulla dignissim massa at metus placerat, at pretium lorem varius. Nunc justo turpis, interdum in sem at, tincidunt condimentum nisl. Maecenas condimentum, diam sit amet luctus fringilla, turpis magna feugiat tellus, vel ultricies odio nisl vel tellus. Ut scelerisque nulla nec placerat tristique. Nullam eu diam a lorem maximus hendrerit in ac erat. Cras vestibulum risus vel elit cursus euismod. Duis ut venenatis magna, sed pellentesque augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris commodo finibus gravida. Donec facilisis sed ex sit amet tincidunt.</p>
</body>
</html>


DiapDealer 02-23-2021 01:42 PM

If it's the specifics you need: right click on any html code in Code View and highlight the "Reformat HTML" context menu item, and then select the "Mend and Prettify Code - All HTML Files" submenu entry. Whoops. missed that @DNSB has already included the specifics.

You might also want to close the Preview window while you perform the task. Not because it's required, but because it will keep Preview from constantly trying to re-render everything all the time. Once the code has been Prettified, you can reopen Preview

KevinH 02-23-2021 01:48 PM

And if that is not the case, please post a couple of random screen shots taken with CodeView of the offending file and post them here just to give us a taste of what the code looks like that is giving Sigil fits.

brent63 02-23-2021 06:53 PM

2 Attachment(s)
See the attached two screen shots.

h6 are changes I'm adding but haven't added yet and will be removed.

All other text and formatting to remain.

Thanks
Brent

KevinH 02-23-2021 07:41 PM

That looks like quite clean xhtml to me with lots of line breaks. I saw nothing that should slow Sigil down at all.

What happens if you use the View menu to hide Preview and try editing in CodeView. Is it still slow?

KevinH 02-23-2021 07:47 PM

Also try removing the empty title tag at the top of the body tag. Technically the title tag should only be inside the head tag and not in a body tag. And technically only one title tag is allowed per HTML document. Does removing it from the body tag impact anything when Preview is visible.

DiapDealer 02-23-2021 09:32 PM

It looks like Preview is scrolled all the way to the top of the page, but I'm not seeing the first two lines of code in Code View (h1 and h3) being displayed. Is that just because the file is so big that I can't see any space above the top of the Preview scrollbar, or are they being hidden by css? Not that that should cause any slowdowns, I'm just trying to get a feel for the content/css in order to try and recreate the behavior.

Tex2002ans 02-23-2021 10:44 PM

Quote:

Originally Posted by brent63 (Post 4096380)
[...] however I do use Open Office to do most of my major typing.

Side Note: You may also want to consider upgrading to LibreOffice:

https://www.libreoffice.org/

LibreOffice is a continuation of OpenOffice created in ~2010.

OpenOffice has been effectively abandoned since ~2014 (only a handful of minor bugs fixed since)!

Ashjuk 02-24-2021 05:10 AM

1 Attachment(s)
Quote:

Originally Posted by brent63 (Post 4096431)
As I do not see them in the editor, how do I go about removing them?

I don't think you should be removing them - more likely you need to add them.

Have a look at the html is something like Notepad++ and they will show as black reversed text at the end of lines.

like this - https://www.mobileread.com/forums/at...1&d=1614157684

If you see just one long line of text that is probably what is causing the slow down.

brent63 02-24-2021 06:16 PM

3 Attachment(s)
To all that have replied see attached.

Also I closed the preview window and selecting text in the editor area is faster. however I like using the preview to see what the file will look like and scroll through the file.

Even with the preview window closed selecting the January and July files take some time to load in the editor window.

KevinH 02-24-2021 07:48 PM

That makes no sense. Loading a file of 160kb or so like your January file in CodeView should be quite fast.

So my guess is you have some anti-virus software that is scanning and watching files that are created in tmp on your machine. This locks the file until the scan is done. All of Sigil's files are created in the tmp folder.

Try telling your anti-virus software to either stop scanning files in tmp or to leave Sigil alone in some fashion. To test if that is the case, try temporarily turning off your access to the internet on your machine (for safety) and then restarting in safe mode with the anti-virus disabled and check the speed.

If still slow we can rule out interference from anti-virus software, if fast, then you have the culprit.

Also how much memory do you have on this machine? QWebEngine is a memory hog so if you do not have much, Sigil will slow down.

KevinH 02-24-2021 07:52 PM

If none of that helps, then please post that epub someplace private and PM "KevinH" here on Mobileread (me) with a link and I will take a look at it and delete it once we understand why it is slowing Sigil down so much.

If you only want to include the one or two slowest chapters that is fine to.

KevinH 02-24-2021 07:55 PM

I did notice that your January file had 22 images linked in. Would you look at your Images Report or All Files report to see how large those image files are, just in case.

DiapDealer 02-25-2021 09:19 AM

The original screenshots for the same book shows way less than 22 images in the entire book. Are there multiple img tags pointing to the same images in those two problematic chapter files?

GerardE 05-19-2021 01:37 PM

Hello again,
I've recently downgraded from 1.5.1 to 1.3 because of the issue I reported earlier, it was just making using Sigil unfeasable to use.

I'll experiment with some publically available epubs to see if I can replicate the circumstances triggering the hanging. I previously looked at Sigil while it was hanging with Process Explorer and it said a thread was running "free memory" continuously.

I'll post a informative update soon 👍

KevinH 05-19-2021 02:45 PM

Please also check this post related to slowdowns seem,y related to Sigil 1.5.1 but was not ...

https://www.mobileread.com/forums/sh...&postcount=102

It turns out their back-up software was causing the problems. Please verify that neither AV nor backup software like that case is causing your issues.

GerardE 06-26-2021 07:32 AM

Fortunatly when I upgraded from 1.3.x to 1.6.0 the problem has disappeared. No closer to a solution but at least it's fixed.

KevinH 06-26-2021 11:04 AM

Yes it would probably be best to test with the latest Sigil-1.6.0.

So far slowdowns have been tracked back to:
- AV software
- Third party utilities that scan files as part of its "security" just like AV (some back-up software)
- Setting lower power consumption settings on computer
- a recent Windows 10 update that impacted video drivers
- old video drivers or missing opengl implementations
- conflicts with Qt based system level utilities.


All times are GMT -4. The time now is 10:33 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.