Port KRecursiveFilterProxyModel to QSortFilterProxyModel
ClosedPublic

Authored by ahmadsamir on Jan 11 2020, 8:51 AM.

Details

Summary

For SectionProxyModel, setting RecursiveFilteringEnabled to true makes
the view slow when e.g. expanding an item in the size tree view, also
filtering is very slow. Reimplement our own recursive filtering by using
code from KRecursiveFilterProxyModel::filterAcceptsRow(), it seems to
work without incurring the performance penalty we get with QSFPM.

For the rest of the instances where KRecursiveFilterProxyModel was used
Set RecursiveFilteringEnabled true by default.

The code still compiles and the unit tests that pass on master still pass.

Diff Detail

Repository
R739 ELF Dissector
Branch
l-krecursive (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20939
Build 20957: arc lint + arc unit
ahmadsamir requested review of this revision.Jan 11 2020, 8:51 AM
ahmadsamir created this revision.
ahmadsamir updated this revision to Diff 73254.Jan 11 2020, 9:43 AM

Link to KF6 task

With the infinite recursion fixed this seems to produce correct results, but the search performance in the size view is now massively worse.

src/ui/elfmodel/sectionproxymodel.cpp
35

This causes an infinite recursion when opening a file now, needs to be QSortFilterProxy::filterAcceptsRow.

ahmadsamir updated this revision to Diff 73270.Jan 11 2020, 1:32 PM

Fix function recursion

I am looking into the performance issue, I'll see if I can track it down.

ahmadsamir updated this revision to Diff 73432.Jan 13 2020, 3:53 PM

Treat SectionProxyModel specially be borrowing code from KRecursiveFilterProxyModel::filterAcceptsRow()

vkrause accepted this revision.Jan 13 2020, 3:57 PM

Thanks for investigating this!

This revision is now accepted and ready to land.Jan 13 2020, 3:57 PM
ahmadsamir updated this revision to Diff 73434.Jan 13 2020, 4:04 PM
ahmadsamir edited the summary of this revision. (Show Details)

Verbatim

This revision was automatically updated to reflect the committed changes.