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

Improve performance #2842

Merged
merged 2 commits into from
Aug 16, 2018
Merged

Conversation

andrewghobrial
Copy link
Contributor

Very small change, but huge performance improvement in this PR.

Two changes:

  1. Use angular AOT compiler improves processing performance greatly on front-end
  2. The angular static output is very large (The main.f361828dc635e1980674.js ~3.75 MB). Using gzip to serve static files reduces this file from 3.75 MB to 866 KB.

I also changed the base path of the static files to be "." (current working directory). This uses the current working directory instead of the location of the binary to determine room path. This helps when an IDE runs your binary in a temp folder, but shouldn't break anything.

@cfdreddbot
Copy link

Hey andrewghobrial!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@andrewghobrial
Copy link
Contributor Author

BTW, the gzip will only affect CF and AIO deployments.. May be useful to check if this is already being done in other deployment modes

@codecov
Copy link

codecov bot commented Aug 15, 2018

Codecov Report

Merging #2842 into v2-master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           v2-master   #2842   +/-   ##
=========================================
  Coverage       71.3%   71.3%           
=========================================
  Files            604     604           
  Lines          25844   25844           
  Branches        5854    5854           
=========================================
  Hits           18427   18427           
  Misses          7417    7417

Copy link
Contributor

@nwmac nwmac left a comment

Choose a reason for hiding this comment

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

LGTM. The other deployments are fronted by nginx, which does the gzip.

@nwmac nwmac merged commit 742f2cf into cloudfoundry:v2-master Aug 16, 2018
@andrewghobrial andrewghobrial deleted the improve-performance branch August 16, 2018 18:33
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.

3 participants