[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 Nate Graham changed: What|Removed |Added Version Fixed In||1.10.2 -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 Albert Astals Cid changed: What|Removed |Added Resolution|--- |FIXED Latest Commit||https://invent.kde.org/grap ||hics/okular/commit/793f1692 ||db244621a0a603a2a7c404cc175 ||7b9ab Status|CONFIRMED |RESOLVED --- Comment #10 from Albert Astals Cid --- Git commit 793f1692db244621a0a603a2a7c404cc1757b9ab by Albert Astals Cid, on behalf of Ahmad Samir. Committed on 23/05/2020 at 10:11. Pushed by aacid into branch 'release/20.04'. Fix filtering items in the contents treeview When filtering the items in the contents panel, we start iterating over them using rootIndex() to get all the children, don't do the same loop for each and every item, one go is enough. Also only use a regular expression if the regularExpression option is enabled, otherwise just use string operations, the latter is always faster. With this change, both regex and non-regex search are faster. M +13 -12 ui/ktreeviewsearchline.cpp https://invent.kde.org/graphics/okular/commit/793f1692db244621a0a603a2a7c404cc1757b9ab -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 Nate Graham changed: What|Removed |Added CC||n...@kde.org -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 --- Comment #9 from Frank Mehnert --- Fix works for me. -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 --- Comment #8 from Ahmad Samir --- It turns out that the issue was in how itemMatches() was being called; it was being called too many times. A proposed fix: https://invent.kde.org/kde/okular/-/merge_requests/166 -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 --- Comment #7 from Ahmad Samir --- Indeed it is slower... reverting the changes in KTreeViewSearchLine::itemMatches() restores the old behaviour. I am looking at it, so far I don't see anything obvious, other than that QRegExp::FixedString has some kind of optimisation that is much faster than what can be achieved by using QRegularExpression::escape() on the pattern (QRegExp docs say that using FixedString is equivalent to searching by using a pattern escaped by using QRegExp::escape()). I could just use plain string comparison when the "regular expression" search option is disabled; string comparison is always faster than regular expression; that doesn't fix the issue for "regular expression"... I'll test some more (but it'll have to wait until tomorrow, it's getting late and I am almost asleep...). Sorry about the trouble :) -- You are receiving this mail because: You are the assignee for the bug.
[okular] [Bug 421469] [Regression] Slow search in the contents pane
https://bugs.kde.org/show_bug.cgi?id=421469 Albert Astals Cid changed: What|Removed |Added Summary|Slow search in the contents |[Regression] Slow search in |pane|the contents pane -- You are receiving this mail because: You are the assignee for the bug.