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)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

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).
Blocks: 7152
This is mine...
Assignee: valeski → warren
Target Milestone: M15
Rehooking into the right dependency for startup performance.
Blocks: 7251
No longer blocks: 7152
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.
Moving non-essential, non-beta2 and performance-related bugs to M17.
Target Milestone: M15 → M17
post-beta2
Target Milestone: M17 → M18
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.
P.S. GetFileSize is related to bug 42772 - eliminate StreamIO::Open
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
verified
Status: RESOLVED → VERIFIED
No longer blocks: 7251
You need to log in before you can comment on or make changes to this bug.