Skip to content

Enable gzip compression on GCS for our hosted examples #238

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

Merged
merged 1 commit into from
Feb 26, 2019
Merged

Conversation

dsmilkov
Copy link
Contributor

@dsmilkov dsmilkov commented Feb 26, 2019

  • Enable gzip compression on our example assets
  • Enable caching (remove the no-cache: private header)
  • Remove the old dist/ files so we do not accumulate multiple versions.
  • Re-uploaded each example by running the deploy.sh script

This saves everyone significant bandwidth (both GCP and the user). Verified the improvement on PageSpeed Insights: See addition-rnn as example


This change is Reviewable

@dsmilkov dsmilkov requested a review from tafsiri February 26, 2019 21:23
@dsmilkov dsmilkov changed the title Enable gzip compression on all our examples Enable gzip compression on GCS for our hosted examples Feb 26, 2019
Copy link
Contributor

@tafsiri tafsiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov and @tafsiri)


deploy.sh, line 52 at r1 (raw file):

  yarn build
  # Remove the example directory.
  gsutil -m rm -r gs://tfjs-examples/$EXAMPLE_NAME

the target dir (here and below) should be $EXAMPLE_NAME/dist because all of the existing links we have point to a dist folder.

Copy link
Contributor

@tafsiri tafsiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov and @tafsiri)


deploy.sh, line 52 at r1 (raw file):

Previously, tafsiri (Yannick Assogba) wrote…

the target dir (here and below) should be $EXAMPLE_NAME/dist because all of the existing links we have point to a dist folder.

Discussed offline and resolved.

@dsmilkov dsmilkov merged commit 1b1c4b5 into master Feb 26, 2019
@dsmilkov dsmilkov deleted the gzip branch February 26, 2019 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants