Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying lazy-loading on div element backgrounds #2090

Closed
wants to merge 1 commit into from

Conversation

arslanashraf7
Copy link
Contributor

Pre-Flight checklist

  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

#2065

What's this PR do?

It adds IntersectionObserver on our div elements to load their background lazily. Initially we used to load the backgrounds of our div elements such as Faculty, Testimonials right when they would render. After this PR the backgrounds will only load once that specific div element is coming into Viewport.

Note: This change give some performance improvement in the suggestion category of Defer Off-Screen images by Lighthouse. Although it adds a bit to the overall performance we should note that the backgrounds to div elements such as Faculty, Testimonials which are around 500kb can take some time to load in worst cases.

How should this be manually tested?

Generate Lighthouse report, See the suggestions section Defer off-screen resources/images. This might need some A/B to test the differences properly.

@odlbot odlbot temporarily deployed to xpro-ci-pr-2090 January 27, 2021 11:45 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-2090 February 1, 2021 11:23 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-2090 February 1, 2021 12:13 Inactive
@codecov-io
Copy link

Codecov Report

Merging #2090 (d44c89b) into master (c0379cc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2090   +/-   ##
=======================================
  Coverage   88.02%   88.02%           
=======================================
  Files         328      328           
  Lines       14936    14936           
  Branches     1035     1035           
=======================================
  Hits        13147    13147           
  Misses       1548     1548           
  Partials      241      241           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0379cc...d44c89b. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants