Closed
Bug 29728
Opened 25 years ago
Closed 25 years ago
nsFileTransport::Process consumes 2 secs out of 19 secs startup
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: dp, Assigned: warrensomebody)
Details
Function % #call millisecs
-----------------------------------------------------------------
nsFileTransport::Process 100.00 87 2068.45
nsLocalFileSystem::Open 49.55 87 2068.45
nsPipe::nsPipeOutputStream::WriteFrom 25.10 154 1047.67
nsLocalFileSystem::GetInputStream 20.81 87 868.64
We are reading in 87 files on startup. Most of them would be chrome files or
gif files that dont need a progress (maybe). So just avoiding stat on them
would save us a bunch. Here is timing on nsLocalFileSystem::Open()
Function % #call millisecs
-----------------------------------------------------------------
do_GetService(nsMIMEService) 51.26 87 1060.35
nsLocalFile::GetFileSize 48.55 87 1004.24
So we do 87 calls to GetFileSize which calls stat. I think the do_GetService()
is mostly spending time on loading the dll (that is 1 sec wow).
| Reporter | ||
Comment 2•25 years ago
|
||
Rehooking into the right dependency for startup performance.
| Assignee | ||
Comment 3•25 years ago
|
||
Another thing that nsFileTransport::Process does that is sub-optimal, is every
time though it's look it acquires and releases it's lock. This lock is used to
coordinate with request cancelation. This is very friendly to the canceler, but
takes a lot more time.
The socket transport, on the other hand, only gives up its lock when it needs
to suspend or resume (because the buffer is full or empty). We should do that
in the file transport too.
| Assignee | ||
Comment 4•25 years ago
|
||
Moving non-essential, non-beta2 and performance-related bugs to M17.
Target Milestone: M15 → M17
| Assignee | ||
Comment 6•25 years ago
|
||
The issue of the lock in the file transport has been addressed. It was removed a
week or so ago.
Eliminating GetFileSize (or making it cheaper by consolidating it with other
stat info) should still be looked at. See bug 18048.
| Assignee | ||
Comment 7•25 years ago
|
||
P.S. GetFileSize is related to bug 42772 - eliminate StreamIO::Open
| Assignee | ||
Comment 8•25 years ago
|
||
Closing this ancient bug. I've long since removed the lock in
nsFileTransport::Process, and I'm not sure what else we can do with the
GetFileSize issue.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•