RESOLVED FIXED 233075
Add a helper class to coordinate batch analysis of images
https://bugs.webkit.org/show_bug.cgi?id=233075
Summary Add a helper class to coordinate batch analysis of images
Wenson Hsieh
Reported 2021-11-12 15:36:44 PST
.
Attachments
Patch (22.97 KB, patch)
2021-11-12 15:57 PST, Wenson Hsieh
no flags
Rebase + implement more logic (24.99 KB, patch)
2021-11-16 08:51 PST, Wenson Hsieh
no flags
Remove unnecessary SPI (24.27 KB, patch)
2021-11-17 08:50 PST, Wenson Hsieh
dino: review+
Patch for landing (24.38 KB, patch)
2021-11-17 11:35 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2021-11-12 15:57:48 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 2 2021-11-16 08:51:20 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2021-11-17 08:50:31 PST
Created attachment 444527 [details] Remove unnecessary SPI
Dean Jackson
Comment 4 2021-11-17 11:21:04 PST
Comment on attachment 444527 [details] Remove unnecessary SPI View in context: https://bugs.webkit.org/attachment.cgi?id=444527&action=review > Source/WebCore/page/ImageAnalysisQueue.cpp:59 > + auto imageIterator = document.images()->createIterator(); What order does document.images() use? I wonder if we can have an iterator that is in document order (more likely to have the images on screen up front). Also, what happens with lazy loaded images?
Wenson Hsieh
Comment 5 2021-11-17 11:29:51 PST
Comment on attachment 444527 [details] Remove unnecessary SPI View in context: https://bugs.webkit.org/attachment.cgi?id=444527&action=review Thanks for the review! >> Source/WebCore/page/ImageAnalysisQueue.cpp:59 >> + auto imageIterator = document.images()->createIterator(); > > What order does document.images() use? I wonder if we can have an iterator that is in document order (more likely to have the images on screen up front). > > Also, what happens with lazy loaded images? Good question! So `document.images()` is already in DOM order, but this is actually not ideal because (as you hinted) it would be better to prioritize images that are on-screen vs. images that are offscreen. For lazily loaded images, I *think* we'll also exclude them from the queue here because the cached image would be 0x0. I have a followup task to add a way to queue images that are dynamically inserted into the document, so I'll use that to make sure lazy loaded images are also handled by these changes. For the time being, I'll file a new bugzilla bug and add a FIXME here.
Wenson Hsieh
Comment 6 2021-11-17 11:35:19 PST
Created attachment 444542 [details] Patch for landing
EWS
Comment 7 2021-11-17 12:22:18 PST
Committed r285949 (244351@main): <https://commits.webkit.org/244351@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444542 [details].
Radar WebKit Bug Importer
Comment 8 2021-11-17 12:23:26 PST
Note You need to log in before you can comment on or make changes to this bug.