Closed Bug 1529780 Opened 2 years ago Closed 2 years ago

Compute ImageCacheKey's hash number lazily

Categories

(Core :: ImageLib, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: ehsan, Assigned: ehsan)

Details

Attachments

(1 file)

In bug 1516540 it has become obvious that ImageCacheKey::GetSpecialCaseDocumentToken()
can be expensive to call. Right now that function is being called
unconditionally from the constructor. This patch changes things
so that the hash number computation which requires calling that
function happens lazily when needed, so in case nothing requires
reading the hash number from the image cache key, that computation
can be skipped.

Priority: -- → P3
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/045d790ca417
Compute ImageCacheKey's hash number lazily; r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.