:: Home :: FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
[v0.81] DiskOp file/dir listing is terribly slow

 
       Skale Tracker Forum Index -> Skale Bug Report
View previous topic :: View next topic  
Author Message
root84
Skale Clueless


Joined: 18 Feb 2006
Posts: 1

Posted: Sat Feb 18, 2006 8:18 pm    Post subject: [v0.81] DiskOp file/dir listing is terribly slow

Hi!

I recently upgraded from v0.802 to v0.81 and noticed that the disk options dialog was annoyingly slow when it hit a larger directory (in my case, about 15 seconds for a directory containing 1500 files).

So I strace'd it and found out that Skale was doing the following things for every file in a directory:
Code:
open("somefile.xxx", O_RDONLY) = 9
fstat64(9, {st_mode=S_IFREG|0644, st_size=20805, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb62d1000
fstat64(9, {st_mode=S_IFREG|0644, st_size=20805, ...}) = 0
_llseek(9, 20480, [20480], SEEK_SET)    = 0
read(9, "\252?\341\241<\25\375\315S\377\0\1\227\377\0\212\240\17"..., 325) = 325
close(9)                                = 0
munmap(0xb62d1000, 4096)                = 0


So, it's opening every file, calling fstat twice(!) on every file, and finally seeking(!) and reading(!) a portion of every file.
What's the purpose of this complicated/inefficient procedure? Is this some kind of file type autodetection based on the contents of the file? Please don't do that, it kills performance and it's annoying for the user.

Version 0.802 was actually very fast when listing files (it used getdents(...) instead of opening and reading every file).
So, basically I'd like to have the v0.802 behaviour back as far as directory listings are concerned.

Please take my posting as constructive criticism, there's no offense intended. Keep up the good work on Skale tracker.
Back to top
st3vie
Skale Administrator


Joined: 13 Nov 2002
Posts: 641
Location: Beverwijk, The Netherlands

Posted: Sun Feb 19, 2006 10:58 am    Post subject:

in Linux the 'usual' way didn't work to get the filesized, so there is a trick
built-in now, which is indeed slower than it should be.

This will be changed in the future of course.

-st3vie
Back to top
Display posts from previous:   
       Skale Tracker Forum Index -> Skale Bug Report All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group