D8838: Don't request pixmaps twice when opening okular
Henrik Fehlauer
noreply at phabricator.kde.org
Thu Nov 23 22:55:37 UTC 2017
rkflx added a comment.
Sorry for the delay, finally could do some testing. First I was quite enthusiastic about what I saw, but then some oddities came up so I cannot draw a conclusion on what I would recommend to do here yet.
Any final patch (i.e. not fulfilled by current patch version) should ensure IMO:
- Thumbnails are less important than the main view and therefore should not delay its rendering.
- If we can currently render a fast document without any delay, we should not regress on that.
Here is what seems odd:
> files after okular is open don't suffer this
IIUC, your explanation is about resize events when the window is opening. However, adding debug output to `resizeEvent` (for `isEmpty()` and for `!isEmpty()`) as well as `slotRequestVisiblePixmaps` shows that this is also happening for a simple Reload. This suggests those events are entirely controlled by Okular code and may be fixable there?
Next, I reverted both `delayResizeEventTimer` related changes to evaluate your fix to the second problem (tested with `dublin-center-street.pdf` @ 200% zoom, with T: thumbnails render, M: main view renders, D: weird delay of several seconds):
| | master | patch | patch w/o timer |
| -------------- | --------- | ----- | --------------- |
| start normal | M-D-M-T-M | T-D-M | M-D-T-M |
| reload normal | M-D-M-T-M | T-D-M | M-D-T-M |
| start rotated | M-D-M-T-M | T-D-M | M-D-T-M |
| reload rotated | M-D-M-T-M | T-D-M | M-D-T-M |
|
Note:
- For normal documents the last M in -M-T-M would sometimes be omitted when choosing another initial window size.
- For rotated documents the last M would sometimes affect only parts of the window.
- T-D-M would sometimes turn into D-T-M when repeating the same test.
- I still do not understand what D is about (in the other Diff you said "There's no text generation for main view and one for thumbnail, there is no reason to generate text twice", but this does not really answer the question I asked?).
- Ideal log: M-T (or rather in parallel ;)
In conclusion, I'm not convinced that the standalone fix for the second problem is completely working either. This is all very strange, maybe you could have another look?
I suspect there is still something else going on, so perhaps we are not yet seeing the root cause? Especially for rotated pages in some cases reloading results in more redraws compared to normal pages and removing window focus can provoke blank pages.
> Ideally here the solution is page rendering cancellation
Yeah, that would be great. Given the other solutions also have problems, this could be worth thinking about?
---
Refs: https://phabricator.kde.org/F5477455, https://phabricator.kde.org/D8379#164630
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D8838
To: aacid
Cc: rkflx, #okular, gassaf, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20171123/bd0d5a5f/attachment.html>
More information about the Okular-devel
mailing list