KIO directory listing - CPU slows down SSD

Frank Reininghaus frank78ac at googlemail.com
Mon Jun 2 16:58:38 UTC 2014


Hi,

2014-06-02 18:42 GMT+02:00 Aaron J. Seigo:
> On Thursday, May 29, 2014 16:32:28 Mark Gaiser wrote:
>> dolphin on a massive folder. In fact, those that use kio::listdir for
>> listing folders only have interfaces that become usable when all
>> entries are fetched.
>
> assuming these UIs receive maintenance over the next years, this pattern is
> likely to fade away. instant feedback and incremental listing is a current
> reality.
>
> you know what would be very nice (but rather complex to achieve...)? for the
> client side of a KIO listing to say "i only want the first N items anyways,
> i'll let you know when i can handle more..." and for sorting to be optionally
> done on the slave side.

funny, some time ago I also thought that (at least partially) sorting
the items on the slave side would make it possible to show the items
in the view much faster - if there was a way to tell the slave "items
are sorted naturally by name, and we only want the first 100 for the
time being", then the slave could go through the entire dirctory very
fast, and only send us the first 100 files (possibly putting the
others into a TODO list which would be sent later, after the first
files have been shown on the screen).

Right now, the fact that we get the items in unsorted batches prevents
us from showing the first batch right after it has been sent. If we
did, items would jump around repeatedly whenever a new batch arrives.

> it is pretty ironic that a UI to show, say, videos from youtube will populate
> at least as smoothly, and on crappy enough hardware even better than, listing
> local directory contents because of this kind of incremental fetch and server-
> side pre-processing.
>
> KIO listing is all-or-nothing batch oriented; a stream-based approach that
> supports seeking through listings that are pre-sorted/grouped in the slave
> process would be moderately gorgeous. it would prevent more IPC than necessary
> and allow the slave to use any&all service-specific features for pre-sort/group
> of entries.

That would be awesome indeed!

Cheers,
Frank


More information about the Kde-frameworks-devel mailing list