Closed
Bug 73214
Opened 24 years ago
Closed 24 years ago
filesystem datasource spends half of its time in FileSystemDataSource::isDirURI()
Categories
(Core Graveyard :: RDF, defect, P3)
Core Graveyard
RDF
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: waterson, Assigned: jtaylor)
References
Details
(Keywords: perf)
Attachments
(4 files)
3.30 KB,
patch
|
Details | Diff | Splinter Review | |
1.26 KB,
patch
|
Details | Diff | Splinter Review | |
1.23 KB,
patch
|
Details | Diff | Splinter Review | |
1.23 KB,
patch
|
Details | Diff | Splinter Review |
I was a bit disappointed in the performance of the RDF outliner, so I profiled
it on a hacked version of directory.xul, which I'll attach to the bug. (Replace
xpfe/components/directory/directory.xul with that version, and rebuild in your
xpfe/components dir.)
It turns out the *half* the time spent scrolling around is spent in
FileSystemDataSource::isDirURI(). Looking at isDirURI(),
- 1/3 of the time is spent in NS_NewURI(), constructing a file: URL
- 1/3 of the time is spent in nsLocalFile::IsDirectory(), which is
all ends up in PR_GetFileInfo64().
- 1/6 of the time is spent in nsStdURL::GetFile().
- 1/6 of the time is spent destroying all these wonderful XPCOM objects
that we've created to test if something is a directory.
I remember rjc complaining about how bad performance got when he converted the
filesystem datasource to nsIFile from nsFileSpec. dougt always said it was rjc's
fault, and mumbled about how rjc was doing stuff wrong. Regardless, this sucks.
kandrot: you are nsIFile whipping boy these days. Make it better!
Reporter | ||
Updated•24 years ago
|
Keywords: mozilla0.9,
perf
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
The GetFileInfo64 is going to be required for the stat. I believe that this
does more work that just a vanilla stat(). I guess we could optimize it so that
only the required information is pulled out for the isExists, isDir, isFile,
ect.
Conrad and I have been sitting on a patch for some times now that should help
out this problem. kandrot, please updating it and check it in. (56354)
r=dougt. Waterson, please sr so that we can get this in asap.
I will attached a patch that will shave a 1/3 of the time off but is dependant
on implementing SetURL on the nsIFile (see above).
Target Milestone: --- → mozilla0.9
Comment 3•24 years ago
|
||
Reporter | ||
Comment 4•24 years ago
|
||
Nice. I suspect we could even improve on this a bit by just making an
nsILocalFile member variable that we use over and over for the purpose of
converting paths. (It's not like this code is threadsafe.) Adding dependency to
bug 56354.
Depends on: 56354
Comment 5•24 years ago
|
||
Well, since this patch calls a function that is not yet implemented, I can not
see checking it in yet. The bug this depends on is marked 1.0, so I am updating
this to be the same.
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9 → mozilla1.0
Comment 6•24 years ago
|
||
kandrot, there is a patch in the other bug. Lets get this fixed! If you can't,
please reassign to me.
Target Milestone: mozilla1.0 → ---
Comment 7•24 years ago
|
||
Yes, there is a patch in this bug, but it calls a function that is not
implemented. Based on this, I would assume that it would not work. It is all
yours to check in, if you believe that it works.
Assignee: kandrot → dougt
Status: ASSIGNED → NEW
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.2
Updated•24 years ago
|
Assignee: dougt → gagan
Whiteboard: intern?
Comment 8•24 years ago
|
||
.
Comment 10•24 years ago
|
||
John, I think that adamlock is going to make this really easy for you. He has a
patch in 53654 which will allow you to directly call SetURL/GetURL on a nsIFile.
Comment 11•24 years ago
|
||
My patch is just for GetURL. Conrad implemented SetURL in his more substantial
patch attached to bug 53654.
Assignee | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
Assignee | ||
Comment 14•24 years ago
|
||
Sorry about the double attachments. Doug, can you review the patch?
Status: NEW → ASSIGNED
Comment 15•24 years ago
|
||
assuming that this has been tested xp, sr=dougt.
Assignee | ||
Comment 17•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•