Closed
Bug 330394
Opened 20 years ago
Closed 14 years ago
LoadImage should not call nsILoadGroup::RemoveRequest
Categories
(Core :: Graphics: ImageLib, defect, P1)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
WORKSFORME
mozilla1.9alpha1
People
(Reporter: darin.moz, Unassigned)
Details
(Keywords: arch)
Attachments
(1 file)
|
13.74 KB,
patch
|
Details | Diff | Splinter Review |
LoadImage should not call nsILoadGroup::RemoveRequest
This results in all kinds of nastiness for the consumer of ImageLib. See, for example, bug 330089. We should make this call always happen asynchronously for consistency.
| Reporter | ||
Comment 1•20 years ago
|
||
The call to RemoveRequest is indirect. It is a side-effect. See this stack trace: https://bugzilla.mozilla.org/attachment.cgi?id=214874
Comment 2•20 years ago
|
||
So this may sound silly... but if we're going to synchronously do the whole shebang here like we do now, could we just not call either AddRequest or RemoveRequest?
I do think that doing it all async would be much better, though...
| Reporter | ||
Comment 3•20 years ago
|
||
> So this may sound silly... but if we're going to synchronously do the whole
> shebang here like we do now, could we just not call either AddRequest or
> RemoveRequest?
Maybe... are there cases where we would miss the WPL notifications?
Comment 4•20 years ago
|
||
We never send OnProgress here, right? I guess someone who's trying to keep track of all loads might care, though....
OK, let's just make this stuff async. ;)
| Reporter | ||
Comment 5•20 years ago
|
||
Yeah, I think we should. It would help at least one extension that I've worked on that wants to inspect imgIRequest objects as they are loaded by the browser.
| Reporter | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
| Reporter | ||
Comment 6•20 years ago
|
||
This is a candidate patch. I'm still in the process of running tests on it to determine perf impact. My theory is that it may be sufficient from a performance point of view to fire OnStartDecode and OnStartContainer synchronous, and then defer the rest of the notifications until a PLEvent runs. This patch implements that design, and I'll report back shortly with performance results.
Comment 7•20 years ago
|
||
Fwiw, if you have time to test doing it all async, that would be great too... I wouldn't be suprised if that has no perf hit (but I wouldn't be surprised if it has one too...)
| Reporter | ||
Comment 8•20 years ago
|
||
Sure, I'll try that too.
| Reporter | ||
Comment 9•20 years ago
|
||
OK, running the Tp test on my T41p thinkpad, I didn't see any markable difference in Tp results:
median average
baseline: 198 209
v1 patch: 196 214
full async: 198 210
Perhaps there'd be a measurable difference on a slower machine.
| Reporter | ||
Comment 10•20 years ago
|
||
Comment on attachment 218240 [details] [diff] [review]
v1 patch
I'd like to go with this patch. I think there may be some testcases out there that might benefit (even slightly) from synchronous OnStartContainer since that would avoid some layout reflow.
Attachment #218240 -
Flags: superreview?(bzbarsky)
Attachment #218240 -
Flags: review?(pavlov)
| Reporter | ||
Comment 11•20 years ago
|
||
Comment on attachment 218240 [details] [diff] [review]
v1 patch
I think more is needed. imgIRequest::Cancel triggers synchronous callbacks, which could result in ordering problems if those callbacks were followed by the callbacks generated from NotifyProxyListener.
Attachment #218240 -
Flags: superreview?(bzbarsky)
Attachment #218240 -
Flags: review?(pavlov)
| Reporter | ||
Comment 12•19 years ago
|
||
-> defaults
Assignee: darin.moz → nobody
Status: ASSIGNED → NEW
QA Contact: imagelib
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Updated•18 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Comment 14•14 years ago
|
||
Do we still need this Boris?
Comment 15•14 years ago
|
||
imgIRequest::Cancel is asynchronous now; we have a synchronous variant, CancelAndForgetObserver, but even it removes from the load group asynchronously.
This looks fine now.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•