04-14-2021, 03:59 PM | #76 |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Here is another test...
Open a longer xhtml file and wait for Preview to load. Then use the scrollbar to scroll way down in CV towards the bottom. Watch Preview and click in CodeView. Preview should NOT reload and should simply scroll to sync? Does Preview Double load in that case as well? |
04-14-2021, 04:04 PM | #77 |
Guru
Posts: 704
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
|
Advert | |
|
04-14-2021, 04:21 PM | #78 |
Grand Sorcerer
Posts: 27,620
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yes. Scrolling and syncing seem to work fine. The double-pump seems to be limited to when first opening a file. Though in case it might help, it also occurs whenever Sigil is minimized and then restored. It does the full double load and then scrolls to whatever position it was left in when minimized.
|
04-14-2021, 04:21 PM | #79 |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Hmm ... in Sigil/src/Tabs/FlowTab.cpp would you please enable the followingdebug output lines by removing the DBG from each and rebuilding.
Code:
void FlowTab::EmitUpdatePreviewImmediately() { DBG qDebug() << "FlowTab emiting UpdatePreviewImmediately from EmitUpdatePreviewImmediately"; emit UpdatePreviewImmediately(); } void FlowTab::EmitScrollPreviewImmediately() { DBG qDebug() << "FlowTab emiting ScrollPreviewImmediately from EmitScrollPreviewImmediately"; emit ScrollPreviewImmediately(); } If only one, then we need to search MainWindow.cpp for other signals or calls to UpdatePreview that are being generated someplace else. |
04-14-2021, 04:41 PM | #80 |
Guru
Posts: 704
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
Both:
Code:
Debug: FlowTab emiting ScrollPreviewImmediately from EmitScrollPreviewImmediately Debug: FlowTab emiting UpdatePreviewImmediately from EmitUpdatePreviewImmediately |
Advert | |
|
04-14-2021, 04:41 PM | #81 |
Grand Sorcerer
Posts: 27,620
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Will do. It will be a bit later on my part, though.
EDIT: thanks Becky! Any takers on whether https://github.com/Sigil-Ebook/Sigil/issues/535 might be related? Last edited by DiapDealer; 04-14-2021 at 04:44 PM. |
04-14-2021, 04:50 PM | #82 |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Yes one of each and that is expected and correct. Not two UpdatePreviewImmediately signals.
So it is not CodeView first loading that is causing 2 loads of Preview. So something else must be causing it. I will start looking. PS. You are opening a completely new tab right. The file was not already in another tab. It may only be when a tab is first loaded that two UpdatePreviewImmediately signals are generated? Last edited by KevinH; 04-14-2021 at 04:54 PM. |
04-14-2021, 05:05 PM | #83 |
Guru
Posts: 704
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
Yes. Double pumping only occurs the first time you open the file. If the tab is already open and we open another file, then return to the previously opened one - no pumping (and one emit).
This one: Code:
Debug: FlowTab emiting UpdatePreviewImmediately from EmitUpdatePreviewImmediately |
04-14-2021, 05:09 PM | #84 |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
I did find two other places that invokes UpdatePreview in MainWindow that might be an issue for opening new tabs for the first time:
The first is when Preview is first shown, or when hidden and shown again: connect(m_PreviewWindow, SIGNAL(Shown()), this, SLOT(UpdatePreview())); That may explain the minimize and restore double pump. And the second happens when a tab change is made to a new tab here: connect(m_TabManager, SIGNAL(TabChanged(ContentTab *, ContentTab *)), this, SLOT(UpdatePreview())); So when a new tab is created and loaded and then changed to (or in the reverse order) , we can end up with preview update being loaded twice. Hmm Perhaps that is an issue once for each tab, but after that changing between two loaded tabs we would need that signal as both have already been loaded. But all of this happens in Sigil 1.3.0 as well so I am not sure why it is causing an issue now and not then. |
04-14-2021, 05:43 PM | #85 |
Member
Posts: 16
Karma: 10
Join Date: May 2020
Device: Kobo Aura One
|
I tried the same things with my AV disabled, but it made no difference.
All the tests were done without the use of the preview window (F10). I also have only one dictionary selected for spell checking. Turning preview on further slows things down, to a point were even selecting menu entries gets slow on occasion. I have also noticed that when I open both the title-page and chapter 12, just switching active windows gives a delay. title-page > chapter 12 about 6s chapter 12 > title page about 1s |
04-14-2021, 05:46 PM | #86 |
Grand Sorcerer
Posts: 27,620
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I think it's only an issue now because URLSchemeHandler might be somehow slowing down Preview enough (at least on older, less capable hardware) to really make it more noticeable. That's my guess anyway. As I mentioned, Preview being loaded asynchronously takes it completely out of the equation with relation to search times. The new CodeView tab is opened and it scrolls to "cocaine-bottle" almost instantly. Same as when Preview is closed on the official 1.5.1 Release. There is no search delay at all. We just need to figure out what is slowing down Preview rendering in 1.5.1.
Last edited by DiapDealer; 04-14-2021 at 05:51 PM. |
04-14-2021, 05:57 PM | #87 | |
Grand Sorcerer
Posts: 27,620
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
But you didn't mention whether or not you tried disabling tag highlighting in 1.5.1 (Preferences->Appearance->CodeView) Last edited by DiapDealer; 04-14-2021 at 06:00 PM. |
|
04-14-2021, 06:09 PM | #88 | |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Could this be related to that Windows powersaver settings thing? What was it called? How do you check what it is set at for Sigil-1.5.1?
Quote:
Last edited by KevinH; 04-14-2021 at 06:25 PM. |
|
04-14-2021, 06:34 PM | #89 | |
null operator (he/him)
Posts: 20,688
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
04-14-2021, 07:10 PM | #90 |
Sigil Developer
Posts: 7,737
Karma: 5446592
Join Date: Nov 2009
Device: many
|
If it is not a powersaving setting, and not related to Preview, then I am stumped as to how it could take 6 seconds to load chapter12 for the first time on any i5 machine with 16 gigs of ram. No one else is seeing such long delays of 6 seconds using your test case, especially with Preview closed.
Something else must be interfering with Sigil and file io? Nothing related to file-io has changed recently. Ideas anyone? Are you using the cloud or other network based file systems as your temp area? Last edited by KevinH; 04-14-2021 at 07:18 PM. |
|
Similar Threads | ||||
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 |