USGS-VIZLAB / vizlab

Package with utilities for building vizlab pages
Creative Commons Zero v1.0 Universal
25 stars 14 forks source link

load usgs-analytics after the footer #375

Closed lindsayplatt closed 6 years ago

lindsayplatt commented 6 years ago

Fixes #374. Working on being smarter about where and when things are loaded. Moving the usgs-analytics.js after everything else on the page.

For water-use-15, it still doesn't load after the actual map data, but does load after all of the footer images (https://github.com/USGS-VIZLAB/water-use-15/issues/313 will work on lazy loading to let javascript stuff happen first).

Before image

After image

wdwatkins commented 6 years ago

What do the colored bars mean? Does this actually hold up the load a consequential amount?

lindsayplatt commented 6 years ago

Well, we are trying to go through and find some quick wins for speeding up load time. Mary suggested moving this to the bottom because 1) there's no need for it to load before anything else, and 2) the browser can only handle ~6 things at one time, so we want to prioritize viz things. This is mostly waiting for other things to finish before it is downloaded, but given Mary's advice, we want to move it down below the priority features.

image

lindsayplatt commented 6 years ago

Is this failing travis build something to be concerned about?

wdwatkins commented 6 years ago

I don't think it could have been your changes. I would guess it's just flakey internet since its the landing page functions that check repos?

lindsayplatt commented 6 years ago

ran this locally and it was fine

Status: 1 WARNING, 1 NOTE

See
  'D:/LRCData/R/vizlab.Rcheck/00check.log'
for details.

checking dependencies in R code ... NOTE
Unexported objects imported by ':::' calls:
  'remake:::assert_character' 'remake:::assert_has_targets'
  'remake:::remake' 'remake:::remake_print_message'
  See the note in ?`:::` about the use of this operator.
R CMD check results
0 errors | 0 warnings | 1 note 

R CMD check succeeded