Closed
Bug 633146
Opened 14 years ago
Closed 14 years ago
Remove unnecessary locking in nsCacheService::OpenCacheEntry
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: bjarne, Assigned: bjarne)
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
michal
:
review+
bzbarsky
:
review+
asa
:
approval2.0-
|
Details | Diff | Splinter Review |
Refer to bug #630420, comment #19
nsCacheService::OpenCachEntry() always grabs the cache-lock. This is only necessary if the request is handled synchronously, i.e. if ProcessRequest() is called from OpenCacheEntry().
Assignee | ||
Comment 1•14 years ago
|
||
This should do the trick. I also cleaned up the code a little.
Passes local testing - pushed to tryserver.
Assignee: nobody → bjarne
Attachment #511345 -
Flags: review?(michal.novotny)
Assignee | ||
Comment 2•14 years ago
|
||
Hmm... didn't do a qref... :(
Here is the cleaned-up code which also deletes the request if dispatching fails.
Attachment #511345 -
Attachment is obsolete: true
Attachment #511348 -
Flags: review?(michal.novotny)
Attachment #511345 -
Flags: review?(michal.novotny)
Assignee | ||
Comment 3•14 years ago
|
||
Tryserver looks fine.
Updated•14 years ago
|
Attachment #511348 -
Flags: review?(michal.novotny) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #511348 -
Flags: approval2.0?
Assignee | ||
Comment 4•14 years ago
|
||
Adding jst and jduell. This fix essentially eliminates one completely unnecessary lock/unlock pair from every channel-load.
Status: NEW → ASSIGNED
Comment 5•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
Given the low return from taking this and the potential for regressions, I'm hesitant to take this days before the last beta. If you think the gain here is large enough to warrant taking any risk here, please renominate.
Attachment #511348 -
Flags: approval2.0? → approval2.0-
Assignee | ||
Comment 6•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
I'm re-nominating this... ;)
Plz refer to bug #630420, comment #37. This patch also avoids blocking main-thread on the cache-service mutex.
I'm also requesting an additional review by bz, asking particularly to assess the potential for regression.
Attachment #511348 -
Flags: review?(bzbarsky)
Attachment #511348 -
Flags: approval2.0?
Attachment #511348 -
Flags: approval2.0-
Comment 7•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
Please re-request approval once this is fully reviewed.
Attachment #511348 -
Flags: approval2.0?
Comment 8•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
As long as the various things the request creation gets off the cache session are either immutable or mutated right now without holding the cache service lock, this looks ok.
Attachment #511348 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 9•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
The request-object is a rather simple creature merely describing the request without referencing anything but the listener. Requesting approval for 2.0 again.
Attachment #511348 -
Flags: approval2.0?
Comment 10•14 years ago
|
||
Comment on attachment 511348 [details] [diff] [review]
Proposed solution v2
not taking for Firefox 4. Please land when we open mozilla-central for post Firefox 4 changes.
Attachment #511348 -
Flags: approval2.0? → approval2.0-
Comment 11•14 years ago
|
||
Whiteboard: fixed-in-cedar
Comment 12•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•