Quote:
Originally Posted by theducks
With 9.13 you SEE find next switch files, then scroll
|
I'm pretty sure that "guilty" is
this commit.
@DiapDealer: Get from AppVeyor history 0.9.13-100 and 0.9.13-101.
0.9.13-100 is last "good". Preview is not reloaded at each change of position the cursor in the Code View (also with any search, because then, of course, also the position of the cursor changes).
From 0.9.13-101 forced call clearMemoryCaches() makes edit epub with preview (refresh, refresh, refresh…) uncomfortable.
How reproduce problem?
1. Open current version Sigil_User_Guide_2019.02.15.epub file
2. Go to "preferences.html" file.
3. Open Preview window.
4. In Code View find "image" and press "Find" and again, again, again...
In 0.9.13-100 Preview is refreshed immediately (of course depending on the computer, memory, etc.)
From 0.9.13-101 Preview is loading whole file again and only then jumps to the right place to display them. It takes precious fractions of seconds and we see an annoying blinking preview window.
Maybe this problem only exists in Windows? If MacOS/Linux better handle cache then just add the condition.
I
really understand the need keep memory footprint small, but problem is clearly in BookViewPreview.cpp
Current code:
Code:
// If this is not the very first load of this document, store the caret location
if (!url().isEmpty()) {
StoreCurrentCaretLocation();
// to help keep memory footprint small clear any memory caches when a new page loads
if (url().path() != path) {
settings()->clearMemoryCaches();
}
}
I built a version for x64 from the latest sources.
After commenting on the red line -- Preview returns to normal, although the memory usage increases as the editing progresses.
I know that this is not the perfect solution.
I think it needs to be detected differently if we are in CodeView still in the same file.