Closed
Bug 281622
Opened 20 years ago
Closed 20 years ago
Opening a directory with many sub directories is slow (3 times slower than with 10.000 files)
Categories
(Core :: Networking: File, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugzilla, Assigned: darin.moz)
Details
My extension needs to read the current temp directory.
I've experienced this:
When reading a directory with 10.000 files it takes around 1200 ms to complete
BUT
When reading a directory with 10.000 subdirectories it takes around 3500 ms to
complete. almost 3 times as long
my code is something like this:
-----------------
var tmpdir = Launchy_DirIO.get("TmpD");
var dir = Launchy_DirIO.open(tmpdir.path);
var contents = Launchy_DirIO.read(dir, true);
-----------------
it's the call to .read that takes a long time.
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b)
Gecko/20050208 Firefox/1.0+
I'd be happy to provide more info
Comment 1•20 years ago
|
||
what do these Launchy_IO methods actually do?
| Reporter | ||
Comment 2•20 years ago
|
||
I use the http://gratisdei.com/io.js and it seems that the dir.isDirectory() call on every file in the directory is to blame. closing since this turns out to be an issue of an external io module
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Assignee | ||
Comment 3•20 years ago
|
||
Henrik: this is a classic problem with visual file explorers. unfortunately, it is costly to "stat" files to determine their type. try opening both directories in the file explorer on your operating system. you may notice that nautilus for one appears to update the type of the file lazily. accessing file system meta data is a bottleneck in most file systems. it would seem that they were not designed with the demands of user interfaces in mind ;-)
You need to log in
before you can comment on or make changes to this bug.
Description
•