nasa / earthdata-search

Earthdata Search is a web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.

Home Page:https://search.earthdata.nasa.gov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EDSC-2673: Lazy load Leaflet

mreese84 opened this issue · comments

Description

In an effort to improve initial load times, we should lazy load Leaflet js. We want to be sure to do this in a way that does not degrade the UX of the initial application load.

Acceptance Criteria

  • Leaflet/map javascript is only loaded in pages that render the map (/search/*, /project)
  • Once the map component is mounted/rendered, it should not be remounted

Hi, I would like to work on this issue, could you assign me it?

Go for it!

Hi @mreese84 ,
I used lazy react component with "Suspense" for "EdscMapContainer".( search page in static/src/js/App.js & static/src/js/routes/Project/Project.js )

Its improves initial app load times.

  • Nothing changed for map component still has same behaviour.
  • its renders once mounted

Could you give me feedback for it?
Do you want me to make another development?
Before i create tests, can we setup small 5mins talk for it ?
Thanks

If you'd like feedback, please open a Pull Request with your changes. We're not able to chat but we can provide any necessary feedback via the PR.

commented

If you folks are still interested in getting it resolved I'd like to work on it @abbottry @mreese84