Delay setting the model on the view until listing is finished.

Authored by hein on Jan 30 2017, 10:01 AM.



This massively cuts down on churn when instanciating a Folder View
configured to a large folder as the changing data set causes the
view to do a large amount of costly work.

A 7x6 Folder View pointed at /usr/bin would block Plasma during
startup for anywhere between 1-4 seconds depending on disk caches
(on a SSD). Now startup is hitch free, and even listing completes
much faster without the view slowing things down.

The widget is set to busy while listing.

Depends on D4343.

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
hein updated this revision to Diff 10697.Jan 30 2017, 10:01 AM
hein retitled this revision from to Delay setting the model on the view until listing is finished..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added a reviewer: Plasma.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptJan 30 2017, 10:01 AM
hein updated this revision to Diff 10700.Jan 30 2017, 10:16 AM

Rebase onto master, remove stray debug.

broulik added inline comments.
189 ↗(On Diff #10697)



We usually just cast inline in the connect

connect(dirLister, static_cast<void(KCoreDirLister::*)()>(&KCoreDirLister::completed), this, &FolderModel::listingCompleted);


I can see this being connected to but where is it emitted?

hein updated this revision to Diff 10704.Jan 30 2017, 10:27 AM
hein marked 2 inline comments as done.

Remove stray signal definition.

davidedmundson accepted this revision.Jan 31 2017, 1:43 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Jan 31 2017, 1:43 PM
This revision was automatically updated to reflect the committed changes.