[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-03-03 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=418086

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org
   Version Fixed In||19.12.3

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-03-02 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=418086

Albert Astals Cid  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED
  Latest Commit||https://invent.kde.org/kde/
   ||okular/commit/81c005710cdbb
   ||23f9ed9ebcc4aee4db69d33434d

--- Comment #9 from Albert Astals Cid  ---
Git commit 81c005710cdbb23f9ed9ebcc4aee4db69d33434d by Albert Astals Cid.
Committed on 02/03/2020 at 21:06.
Pushed by aacid into branch 'release/19.12'.

Fix re-rendering of images when using partial updates

Partial updates trigger when the page is taking "too much" to render (>
500 ms).

When this happens we store a pixmap for the page, this meant that
Page::hasPixmap returned true, so when moving the viewport around we
would think that that page was already rendered, and thus needed no
rendering so we didn't add it to the list of requested pixmaps.

Then on document when seeing the new list of requested pixmaps we would
go and check and say "oh there's one request going on that we don't want
anymore, let's cancel it", so we would cancel the page that we actually
wanted (and clear the partial pixmap)

Then on the next scroll we would realize we did not have that page
pixmap and then request it again which since it's the current page would
immediately stop all other renders and start this one.

Then we would get a temporary pixmap and the loop of cancellations and
requesting again would keep happening as long as the user moved the
viewport.

We fix that my making hasPixmap return false if the pixmap we have is a
partial one, because that's what the function meant "forever" until we
recently introduced partial updates so all the calls to hasPixmap
actually mean "hasNonPartialPixmap"

M  +6-0core/page.cpp
M  +2-1core/page.h
M  +1-0core/page_p.h

https://invent.kde.org/kde/okular/commit/81c005710cdbb23f9ed9ebcc4aee4db69d33434d

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-24 Thread Postix
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #8 from Postix  ---
(In reply to Albert Astals Cid from comment #7)
> Yes you are, please see the end of https://okular.kde.org/download.php

If I try to execute ~/.local/bin/okular it only writes a memory dump. :-/

source build/prefix.sh; ./build/okular seems to still load the wrong libraries
and settings.

I am afraid someone else has to evaluate it until I find the time to find the
error on my side.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-24 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #7 from Albert Astals Cid  ---
(In reply to Postix from comment #5)
> (In reply to Albert Astals Cid from comment #4)
> > In case you know how to compile from git proposed solution at
> > https://invent.kde.org/kde/okular/-/merge_requests/125
> 
> I tried it as follows:
> 
> git clone https://github.com/KDE/okular.git
> cd okular
> git fetch "https://invent.kde.org/aacid/okular.git;
> "fix_unneeeded_rerendering"
> git checkout -b "aacid/okular-fix_unneeeded_rerendering" FETCH_HEAD
> git fetch origin
> git checkout "origin/release/19.12"
> git merge --no-ff "aacid/okular-fix_unneeeded_rerendering"
> 
> mkdir build && cd build
> cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=~/.local
> make -j4
> ./shell/okular
> 
> Then I loaded the problematic PDF, which opened at page 6 as Okular seems to
> use the settings of the package installed Okular.
> 
> Result: 
> 1) Okular first rendered slowy the very big images on page 6
> 2) Then it rendered the rest very quickly
> 3) It started rendering the previews
> 
> Unfortunately, moving the viewport still resulted in re-rendering of 3). :-(
> 
> Or maybe I am doing something wrong here.

Yes you are, please see the end of https://okular.kde.org/download.php

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-24 Thread Postix
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #6 from Postix  ---
OT: Side note, with the debug build as desribed above and the problematic PDF,
I see the following in the terminal output:

Bogus memory allocation size
Bogus memory allocation size
Bogus memory allocation size
(~20x more)

Is that something to fix? The RAM does actually not fill up, it just throws
those errors.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-24 Thread Postix
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #5 from Postix  ---
(In reply to Albert Astals Cid from comment #4)
> In case you know how to compile from git proposed solution at
> https://invent.kde.org/kde/okular/-/merge_requests/125

I tried it as follows:

git clone https://github.com/KDE/okular.git
cd okular
git fetch "https://invent.kde.org/aacid/okular.git; "fix_unneeeded_rerendering"
git checkout -b "aacid/okular-fix_unneeeded_rerendering" FETCH_HEAD
git fetch origin
git checkout "origin/release/19.12"
git merge --no-ff "aacid/okular-fix_unneeeded_rerendering"

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=~/.local
make -j4
./shell/okular

Then I loaded the problematic PDF, which opened at page 6 as Okular seems to
use the settings of the package installed Okular.

Result: 
1) Okular first rendered slowy the very big images on page 6
2) Then it rendered the rest very quickly
3) It started rendering the previews

Unfortunately, moving the viewport still resulted in re-rendering of 3). :-(

Or maybe I am doing something wrong here.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-23 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #4 from Albert Astals Cid  ---
In case you know how to compile from git proposed solution at
https://invent.kde.org/kde/okular/-/merge_requests/125

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-23 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=418086

Albert Astals Cid  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |---
 Ever confirmed|0   |1
 Status|NEEDSINFO   |CONFIRMED

--- Comment #3 from Albert Astals Cid  ---
ok, i can see this and i know what's wrong, need to think how to fix it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-23 Thread Postix
https://bugs.kde.org/show_bug.cgi?id=418086

--- Comment #2 from Postix  ---
I uploaded the PDF and send you a link to your mail address.

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-23 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=418086

Albert Astals Cid  changed:

   What|Removed |Added

 Resolution|--- |WAITINGFORINFO
 Status|REPORTED|NEEDSINFO
 CC||aa...@kde.org

--- Comment #1 from Albert Astals Cid  ---
Can we have such a file?

-- 
You are receiving this mail because:
You are watching all bug changes.

[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

2020-02-23 Thread Postix
https://bugs.kde.org/show_bug.cgi?id=418086

Postix  changed:

   What|Removed |Added

 CC||pos...@posteo.eu

-- 
You are receiving this mail because:
You are watching all bug changes.