RESOLVED FIXED Bug 198530
Improve performance of the lazy image loader
https://bugs.webkit.org/show_bug.cgi?id=198530
Summary Improve performance of the lazy image loader
Jon Davis
Reported 2019-06-04 08:26:26 PDT
Improve CPU performance on webkit.org pages by using an IntersectionObserver implementation.
Attachments
Patch (6.94 KB, patch)
2019-06-04 08:41 PDT, Jon Davis
no flags
Patch (6.97 KB, patch)
2019-06-04 10:53 PDT, Jon Davis
no flags
Jon Davis
Comment 1 2019-06-04 08:41:17 PDT
Devin Rousso
Comment 2 2019-06-04 08:55:55 PDT
Comment on attachment 371285 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=371285&action=review r=me, neat! It may be worth a simple `if (window.IntersectionObserver)` check around (or as an early return in) `lazyLoadImages` so we don't throw an error if it's not supported. > Websites/webkit.org/ChangeLog:-101 > - I don't think we normally go back and edit ChangeLog entries, no matter how "bad" they may be. > Websites/webkit.org/wp-content/themes/webkit/scripts/global.js:-2 > - var openClass = ' open-menu', A comment explaining why this isn't needed would be nice :) > Websites/webkit.org/wp-content/themes/webkit/scripts/global.js:6 > + for (let table of tables) { Are we using `let` now??!? =D > Websites/webkit.org/wp-content/themes/webkit/scripts/global.js:22 > + if (backgroundImages.length == 0) NIT: you could use `!backgroundImages.length` instead
Jon Davis
Comment 3 2019-06-04 10:53:23 PDT
EWS
Comment 4 2019-06-04 18:43:35 PDT Comment hidden (obsolete)
WebKit Commit Bot
Comment 5 2019-06-04 19:21:32 PDT
Comment on attachment 371301 [details] Patch Clearing flags on attachment: 371301 Committed r246094: <https://trac.webkit.org/changeset/246094>
WebKit Commit Bot
Comment 6 2019-06-04 19:21:34 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-06-04 19:25:08 PDT
Note You need to log in before you can comment on or make changes to this bug.