Port KRecursiveFilterProxyModel to QSortFilterProxyModel

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



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

R739 ELF Dissector
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir requested review of this revision.Sat, Jan 11, 8:51 AM
ahmadsamir created this revision.
ahmadsamir updated this revision to Diff 73254.Sat, Jan 11, 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.


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

ahmadsamir updated this revision to Diff 73270.Sat, Jan 11, 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.Mon, Jan 13, 3:53 PM

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

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

Thanks for investigating this!

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


This revision was automatically updated to reflect the committed changes.