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

Precompress production bundles #4571

Merged
merged 1 commit into from Aug 31, 2018
Merged

Conversation

Legioth
Copy link
Member

@Legioth Legioth commented Aug 31, 2018

By precompressing the production bundle and related files, the download
size is significantly reduced even in cases where the application server
isn't configured to compress static resources on-the-fly. In addition to
gzip, precompression is also done with Brotli for further savings when
applicable.

The bundle size for Beverage Buddy is reduced from 729 KB to 191 KB with
gzip and 153 KB with Brotli. With the Fast 3G preset in Chrome,
application load time with an empty cache is reduced from around 5.4
seconds to 2.4.

Note that Brotli files will only be automatically used after #4556 has
also been merged.

Fixes #3765


This change is Reviewable

By precompressing the production bundle and related files, the download
size is significantly reduced even in cases where the application server
isn't configured to compress static resources on-the-fly. In addition to
gzip, precompression is also done with Brotli for further savings when
applicable.

The bundle size for Beverage Buddy is reduced from 729 KB to 191 KB with
gzip and 153 KB with Brotli. With the Fast 3G preset in Chrome,
application load time with an empty cache is reduced from around 5.4
seconds to 2.4.

Note that Brotli files will only be automatically used after #4556 has
also been merged.

Fixes #3765
@SomeoneToIgnore SomeoneToIgnore self-assigned this Aug 31, 2018
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r1.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale


flow-maven-plugin/src/main/resources/gulpfile.js, line 126 at r1 (raw file):

                  .pipe(gzip());
              const brotliStream = gulp.src(`${configurationTargetDirectory}/**/*.{html,css,js}`)
                  .pipe(brotli.compress());

We might be compressing it with different compression level in comparison to the one in #4556

bit it's not really related, so might be fine.

@SomeoneToIgnore SomeoneToIgnore merged commit 9728006 into master Aug 31, 2018
@SomeoneToIgnore SomeoneToIgnore deleted the precompressProdution branch August 31, 2018 12:34
@SomeoneToIgnore SomeoneToIgnore added this to the 1.1.0.beta3 milestone Sep 3, 2018
@Legioth
Copy link
Member Author

Legioth commented Sep 3, 2018


flow-maven-plugin/src/main/resources/gulpfile.js, line 126 at r1 (raw file):

Previously, SomeoneToIgnore (Kirill Bulatov) wrote…

We might be compressing it with different compression level in comparison to the one in #4556

bit it's not really related, so might be fine.

For the record, I have manually verified that both libraries use the highest compression level by default.

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.

None yet

2 participants