Closed Bug 898320 Opened 11 years ago Closed 10 years ago

Investigate deferring of image loading in fireplace

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P4)

x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
2014-03-25

People

(Reporter: scolville, Assigned: kngo)

References

Details

(Keywords: perf, Whiteboard: [fireplace][qa+])

I noticed the other day that when scrolling the marketplace listings on the Unagi the scrolling appears to be blocked when images are still loading.

It would be interesting to see if we moved to load all images only when they're in the viewport if this would improve scroll performance and generally improve the perception of performance of the app.

To repro this load up a listing and move down until you see the more button. Click it and try scrolling as soon as content loads in. Observe the network indicator.

One thing to avoid with deferred image loading in relation to scrolling is the effect of fast scrolling queuing up requests for everything that's flown past the viewport (the more button may mitigate this to some degree as it limits the number of items).
Keywords: perf
Whiteboard: [fireplace]
It might be interesting to build this as a general module that we can put in commonplace. Some considerations:

- We should load two, maybe even three viewport heights ahead. The wifi is pretty bad and users are going to end up always waiting for icons to load if the cutoff is the bottom of the screen.
- We should load in large chunks (or possibly even just say "Only load the first two viewports worth, then if they scroll lower, load all of the rest"). If we don't, the scrolling will be blocked every time we start downloading new images, and we should keep that infrequent.
- We shouldn't do this for SVGs or images that can be cached effectively.

This is something that could also probably be done in conjunction with bug 865813.
Priority: -- → P4
Assignee: nobody → kngo
https://github.com/mozilla/fireplace/pull/364

STR (homepage):

1. Go to Marketplace home page.

Expected:

Icons load deferred (after the initial page load, expect 6 at a time due to maximum parallel requests).

Actual:

Icons all load at once.

STR (search/listing):

1. Search for 'fire' on Marketplace search.
2. Toggle expanded/screenshot view.
3. Scroll down quickly.

Expected:

Icons load while scrolling. Screenshots load after stopping. When scrolling up quickly, see how many screenshots aren't loaded because they are deferred.

Actual:

All at once.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fireplace] → [fireplace][qa+]
Target Milestone: --- → 2014-03-25
I used a Speed limit tool (Charles proxy) in order to better capture the results from scenario 1(with normal speed page is instantly loaded for me) and for the other scenario everything worked as expected with normal speed.
Please see screencast : http://screencast.com/t/TWjbnF1bQF

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