Closed Bug 1755226 Opened 3 years ago Closed 3 years ago

check if there are any "http-on-image-cache-response" observers in imgLoader::NotifyObserversForCachedImage before doing any work

Categories

(Core :: Graphics: ImageLib, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: tnikkel, Assigned: sefeng)

References

Details

Attachments

(2 files)

Attached file imgc.html

(You need to provide a local file white.png for the testcase, I used a small image I had handy)

With the attached testcase I compared current behaviour vs commenting out the call to NotifyObserversForCachedImage.

Current behaviour was about 290ms, commenting out NotifyObserversForCachedImage was about 180ms.

So it seems worth it to optimize.

Blocks: 1722759
Severity: -- → S3
Assignee: nobody → sefeng

This is an optimization to avoid doing redundant things when there are no
registered observers.

Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/480ba71887c8 Only notify 'http-on-image-cache-response' when there are registered observers r=tnikkel
Flags: needinfo?(sefeng)
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ccf8fba00ca0 Only notify 'http-on-image-cache-response' when there are registered observers r=tnikkel,emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: