Closed Bug 1558312 Opened 5 years ago Closed 5 years ago

Implement optimistic loading of images

Categories

(Firefox :: New Tab Page, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 69
Iteration:
69.4 - Jun 24 - Jul 7
Tracking Status
firefox69 --- verified

People

(Reporter: gsuntop, Assigned: gsuntop)

References

Details

(Keywords: github-merged)

Attachments

(1 file)

Currently we are lazy loading images when the base of the viewport is scrolled past the point of intersection with the top of an image placeholder.

We can cut down on images "blinking" into view by loading them optimistically instead. This means starting the load once the bottom of the viewport approaches a certain distance (aka threshold) of the top of an image (something like 3-500px, but it will take some experimentation).

This has some advantages over loading all the remaining unseen images on a browser idle event, namely that people aren't forced to download every image regardless of whether they will ever view them.

Blocks: perf-tweaks
Priority: -- → P2
Component: Activity Streams: Newtab → New Tab Page
Iteration: --- → 69.4 - Jun 24 - Jul 7
Priority: P2 → P1
Blocks: 1563243
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: github-merged
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69

I have verified that images are now loaded before reaching them as you scroll down the page (compared with the build from 2019-07-03 where you could actually see the images being loaded) on the latest Nightly 70.0a1 (Build ID 20190708213342) on Windows 10, macOS 10.14, and Arch Linux 4.14.3.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: