Closed Bug 632490 Opened 9 years ago Closed 9 years ago
Use a content-type hint for the channel in moz
JSSub Script Loader::Load Sub Script
Bug 632177 shows that GetMIMEInfoFromOS can be very expensive for Fennec. This function is called by nsFileChannel::MakeFileInputStream, which is triggered by NS_OpenURI when a file: URI is passed to LoadSubScript. This patch avoids the expensive GetMIMEInfoFromOS call by setting a MIME-type "hint" on the channel. Nominating for blocking-fennec because this impacts Fennec startup time (which makes heavy use of LoadSubScript). With this patch plus the patch from bug 632417, I can get all the way through Fennec startup without any calls to GetMIMEInfoFromOS.
Attachment #510695 - Flags: review?(cdleary)
Assignee: general → mbrubeck
Status: NEW → ASSIGNED
Attachment #510695 - Flags: review?(cdleary) → review+
(In reply to comment #1) > > Add a comment here explaining why we don't use the more-concise OpenURI (which > would probably like a content-hint overload later?), and r=shaver. What would be even nice is having NS_OpenURI do a WARNING() that it's slow :)
This looked good on try; pushing to m-c: http://hg.mozilla.org/mozilla-central/rev/682d008059c6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
looks like checkin-needed is not useful anymore? Set it back if I'm wrong.
You need to log in before you can comment on or make changes to this bug.