Open Bug 1149612 Opened 9 years ago Updated 2 years ago

Improve nsHttpChannel::AsyncOpen() performance

Categories

(Core :: Networking: HTTP, defect, P3)

defect

Tracking

()

People

(Reporter: snorp, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [necko-backlog])

Attachments

(1 file)

We spend a pretty decent amount of time just firing off network requests, which is clogging up the main loop. In the attached profile, we fire off a couple dozen speculatively requests for images, and it takes us nearly 200ms (2751ms - 2939ms). It seems like this could be better.
No longer depends on: 1148526
Some of this is figuring out UA overrides, which I disabled in the attached trace. Bug 1148544 was filed for that specific issue, and contains a profile with the callbacks enabled.
10% of the time is in mozilla::net::PredictorLearn(). It seems like that could be moved off the main thread if it has to do actual work.
Looks like a substantial amount of time spent in nsChannelClassifier::Start(). Of that, I sometimes see nsThread::PutEvent() showing up.
I think OpenCacheEntry() might be the biggest offender here (other than comment #1).
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #4)
> I think OpenCacheEntry() might be the biggest offender here (other than
> comment #1).

Can you get more granularity here?
(In reply to Honza Bambas (:mayhemer) from comment #5)
> (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #4)
> > I think OpenCacheEntry() might be the biggest offender here (other than
> > comment #1).
> 
> Can you get more granularity here?

I can try, yeah.
Whiteboard: [necko-backlog]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: