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

Serve ClientEngine as Brotli compressed if possible #4556

Merged
merged 1 commit into from
Aug 31, 2018

Conversation

Legioth
Copy link
Member

@Legioth Legioth commented Aug 26, 2018

Brotli is supported by many browsers, but only over https (or on
localhost). Using Brotli instead of gzip reduces the download size for
the client engine by about 15%.

Fixes #3764


This change is Reviewable

Brotli is supported by many browsers, but only over https (or on
localhost). Using Brotli instead of gzip reduces the download size for
the client engine by about 15%.

Fixes #3764
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 1 issue

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR ResponseWriter.java#L80: Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed. rule

Legioth added a commit that referenced this pull request 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
Copy link
Contributor

@caalador caalador 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 2 of 2 files at r1.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained, and 1 stale

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

5 participants