Closed Bug 139082 Opened 24 years ago Closed 24 years ago

nsCookieHttpNotify::OnExamineResponse was caused to frequently

Categories

(Core :: Networking: HTTP, defect)

x86
All
defect
Not set
major

Tracking

()

VERIFIED WONTFIX

People

(Reporter: jack.jia, Assigned: darin.moz)

Details

Because calling "nsHttpHandler::get()->OnExamineResponse(this)"( in nsHttpChannel::ProcessResponse()) will switch threads. I checked all the source code, the nsCookieHttpNotify and nsP3pHttpNotify is the only two reponse. so, I think we should add the decision condition in the nsHttpChannel::ProcessResponse () only to call OnExamineReponse when the header is "set_cookie" & "P3P" . In this way, we can reduce the times for switch threads. so, we can enhance the performance of browser.
-> Darin
Assignee: new-network-bugs → darin
Status: UNCONFIRMED → NEW
Component: Networking → Networking: HTTP
Ever confirmed: true
QA Contact: benc → tever
i don't understand... what do you mean by switch threads? necko is not threadsafe. you can only call HTTP from the main UI thread. if you are doing otherwise, you have bigger problems to worry about!!
when I debug the mozilla. I set a breakpoint in the nsCookieHttpNotify::OnExamineResponse, the program stop at breakpoints many times, but most of them only decide if it was "set_cookie" and exit, only the "set_cookie" Http Response head process some valuable code. so, I think if we can add some decision condition in the high level (for example in the nsHttpChannel::ProcessResponse()) , we can avoid the unuseful call for nsCookieHttpNotify::OnExamineResponse. "switch threads", because the subfunction for parsing httphead and nsCookieHttpNotify::OnExamineResponse run in the diffrent threads. so , when i debug, i see the switch thread. it is not my man idea. I file this bug in order to reduce the times of calling nsCookieHttpNotify::OnExamineResponse.
ok... the problem you are describing is a well known problem. the solution is not to limit when we call OnExamineResponse. that cannot be done because we cannot know for sure that new consumers won't come along later... other xpcom components can be written to implement OnExamineResponse. this could be done with a build that mozilla has already shipped, so there is no way to special case OnExamineResponse. see related bug 103745 and bug 96178 where this issue is discussed further. marking WONTFIX
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
V/wontfix, per darin.
Status: RESOLVED → VERIFIED
QA Contact: tever → benc
You need to log in before you can comment on or make changes to this bug.