This forum has been archived. All content is frozen. Please use KDE Discuss instead.

File sorting issue in Dolphin

Tags: None
(comma "," separated)
flux
Registered Member
Posts
5
Karma
0
OS

File sorting issue in Dolphin

Fri Apr 06, 2012 4:23 am
After upgrading KDE to 4.8.1 I found that Dolphin sorts files by 'name' first and then, in an instance, by the field I want. So if I choose to sort by 'type' and navigate to any folder containing lots of files I see that they are sorted by 'name' and in a second the sort order changes by 'type'. Does anybody experience the same or I got some misconfigurations...?
User avatar
oboedad55
Registered Member
Posts
32
Karma
0
OS

Re: File sorting issue in Dolphin

Fri Apr 06, 2012 4:32 am
flux wrote:After upgrading KDE to 4.8.1 I found that Dolphin sorts files by 'name' first and then, in an instance, by the field I want. So if I choose to sort by 'type' and navigate to any folder containing lots of files I see that they are sorted by 'name' and in a second the sort order changes by 'type'. Does anybody experience the same or I got some misconfigurations...?


I notice the same thing; however once they are resorted the first time everything seems OK. Does the problem persist or is it just the first time?


Registered Linux user #436067
---------------------------------------
Linux assumes you know exactly what you are doing.
flux
Registered Member
Posts
5
Karma
0
OS

Re: File sorting issue in Dolphin

Fri Apr 06, 2012 2:28 pm
Yes, only the first time I enter the directory. But when I close Dolphin and start it again the same problem appears...
freininghaus
Moderator
Posts
224
Karma
1
OS

Re: File sorting issue in Dolphin

Sat Apr 14, 2012 12:05 pm
You're right, I could reproduce this. You say that you saw this issue first after upgrading to 4.8.1. Did you upgrade from 4.8.0 or from an earlier version? (This might help to narrow down the cause of the bug).
freininghaus
Moderator
Posts
224
Karma
1
OS

Re: File sorting issue in Dolphin

Sun Apr 15, 2012 12:40 pm
I just found out that Peter has fixed this bug a couple of days ago for KDE 4.9:

https://projects.kde.org/projects/kde/k ... a1b322dc08

Unfortunately, the fix cannot be backported easily to KDE 4.8.x without risking regressions because it changes quite a bit of code.

Some technical background about why the bug happens in the first place: In some cases, determining the file type can be an expensive operation, in particular, if the contents of the file have to be read to determine the type. If this happens in a directory with many files, there is a risk that this would block the user interface for a long time. Therefore, the file type is determined asynchronously in the background. Before the results arrive, the files are sorted by name (this always happens if the type of a number of files is the same or unknown).

However, in most cases, determining the file type is a lot faster than in the worst case. Therefore, Dolphin will try to determine the type of all files synchronously (i.e., before sorting and showing the files) for 200 ms, which is not noticed as a blocking of the GUI. If this succeeds, which is usually the case, the files are not sorted by name first.
flux
Registered Member
Posts
5
Karma
0
OS

Re: File sorting issue in Dolphin

Fri Apr 20, 2012 6:25 am
freininghaus wrote:I just found out that Peter has fixed this bug a couple of days ago for KDE 4.9:

https://projects.kde.org/projects/kde/k ... a1b322dc08

Unfortunately, the fix cannot be backported easily to KDE 4.8.x without risking regressions because it changes quite a bit of code.

Some technical background about why the bug happens in the first place: In some cases, determining the file type can be an expensive operation, in particular, if the contents of the file have to be read to determine the type. If this happens in a directory with many files, there is a risk that this would block the user interface for a long time. Therefore, the file type is determined asynchronously in the background. Before the results arrive, the files are sorted by name (this always happens if the type of a number of files is the same or unknown).

However, in most cases, determining the file type is a lot faster than in the worst case. Therefore, Dolphin will try to determine the type of all files synchronously (i.e., before sorting and showing the files) for 200 ms, which is not noticed as a blocking of the GUI. If this succeeds, which is usually the case, the files are not sorted by name first.


Thanks for the explanation. So we should wait for 4.9 to see this bug fixed, right?
freininghaus
Moderator
Posts
224
Karma
1
OS

Re: File sorting issue in Dolphin

Fri Apr 20, 2012 7:43 am
flux wrote:Thanks for the explanation. So we should wait for 4.9 to see this bug fixed, right?


Yes, that's right.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]