Open Bug 2084685 Opened 1 month ago Updated 1 month ago

www.dataforindia.com - Graphs and maps load is delayed

Categories

(Web Compatibility :: Site Reports, defect, P1)

Firefox 160
Desktop
Windows 10

Tracking

(Webcompat Priority:P3, Webcompat Score:3, firefox-esr153 wontfix, firefox158 wontfix, firefox159 wontfix, firefox160 fix-optional)

Webcompat Priority P3
Webcompat Score 3
Tracking Status
firefox-esr153 --- wontfix
firefox158 --- wontfix
firefox159 --- wontfix
firefox160 --- fix-optional

People

(Reporter: ctanase, Unassigned)

References

(Regression, )

Details

(4 keywords, Whiteboard: [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success])

User Story

autowebcompat-repro-status:success
autowebcompat-repro-chrome-mask-fixed:false
autowebcompat-repro-channels:nightly,stable,esr
autowebcompat-repro-report-os:all
autowebcompat-diagnosis-status:success
platform:windows,mac,linux,android
impact:annoyance
configuration:general
affects:all
branch:release
diagnosis-team:dom
user-impact-score:40

Attachments

(3 files)

Attached video FF vs Chrome.mp4 —

Environment:
Operating system: Mac/Windows 10
Firefox version: Firefox 152.0.5 (release)/158/160

Preconditions:

  • Clean profile

Steps to reproduce:

  1. Navigate to: https://www.dataforindia.com/meat-consumption/
  2. Wait for the page to stop loading.
  3. Scroll slowly to the bottom of the page.

Expected Behavior:
The graphs and maps appear instantly (or almost instantly).

Actual Behavior:
The graphs and maps load is delayed.

Notes:

  • Reproducible on the latest Firefox Release and Nightly
  • Reproducible regardless of the ETP setting
  • Works as expected using Chrome

Created from webcompat-user-report:bc770c9e-10d1-4734-a7f1-fa43eed956a6

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Keywords: perf, regression
Regressed by: 1622090
Whiteboard: [webcompat-source:product] → [webcompat-source:product][autowebcompat:processed][autowebcompat:reproduction-in-progress]

Set release status flags based on info from the regressing bug 1622090

User Story: (updated)
Whiteboard: [webcompat-source:product][autowebcompat:processed][autowebcompat:reproduction-in-progress] → [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success][autowebcompat:diagnose]

The charts and maps on the page are lazy-loaded iframes (loading="lazy"). Firefox starts fetching each one only after it scrolls into the viewport, so a chart shows up late as the user scrolls to it. Chrome fetches the iframes below the fold ahead of time, so the charts are already loaded when the user reaches them.

Whiteboard: [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success][autowebcompat:diagnose] → [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success][autowebcompat:diagnosis-in-progress]

Root cause analysis generated by autowebcompat bot:

The article embeds every chart and map as <iframe loading="lazy" src="https://charts.dataforindia.com/charts/...">, which are plain children of the document scroller. There is no UA sniffing and no JS loader. Each browser decides on its own when a lazy iframe gets fetched, based on how far below the viewport it is (its lazy-load root margin).

Firefox uses a single fixed 600px bottom margin (dom.lazy-loading.margin.bottom) for both lazy images and lazy iframes. Chrome uses much larger distance thresholds, especially for iframes: about 1250px for images and several thousand px for iframes on a fast connection. The charts on this page are tall (550–730px) and spaced about 1000px apart. So in Firefox, the chart below the first one is just outside the 600px window and only starts loading once you scroll close to it. The heavy chart document then visibly pops in late, while Chrome has already fetched it.

The spec leaves the margin implementation-defined, so this is a heuristic/interop difference, not a spec violation. See lazy load root margin and will lazy load element steps.

Evidence:

Live site (1280x900 viewport, scroll 0, page fully loaded; chart fetches checked with performance.getEntriesByType("resource")):

  • Firefox only fetched the chart at top 732. The next one (top 1553, 653px below the fold) was not fetched in any of 3 runs.
  • Chrome fetched the charts at 732, 1552 and 2526 (up to about 1626px below the fold).
  • No chart iframe has an ancestor with overflow, contain or content-visibility set, so a nested scroller is not involved.

Reduced testcase (lazy iframes and lazy images placed at fixed distances below the fold, no scrolling):

  • Firefox: iframes and images both loaded at 100, 300 and 600px. Nothing loaded at 900px or beyond. A finer probe loaded iframes at 560–600px and none from 620 to 900px, so the cutoff is exactly 600px.
  • Chrome: iframes loaded at every distance up to 3000px. Images loaded up to 900px but not at 1250px.

The Firefox binary has the prefs dom.lazy-loading.margin.{top,bottom,left,right} (plus *.percentage and is-scroll variants), and lazy iframes use them too.


If you'd like to provide feedback on diagnosis, please use the 👍 or 👎 reaction.

User Story: (updated)
Whiteboard: [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success][autowebcompat:diagnosis-in-progress] → [webcompat-source:product][autowebcompat:processed][autowebcompat:repro-success]

Let's have the DOM team diagnose if we can do better here.

Severity: -- → S3
User Story: (updated)
Webcompat Priority: --- → P3
Webcompat Score: --- → 3
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: