Skip to content

Chunks are not gzipped in production #2340

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

Closed
mwawrusch opened this issue Sep 25, 2016 · 6 comments
Closed

Chunks are not gzipped in production #2340

mwawrusch opened this issue Sep 25, 2016 · 6 comments

Comments

@mwawrusch
Copy link

mwawrusch commented Sep 25, 2016

When using lazy loading modules the resulting chunks (like 0.59ea61d3b756000074ac.chunk.js ) are not gzipped.

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Yosemite
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.15
node: 6.1.0
os: darwin x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

Create an app with a lazy loaded module. run ng build --prod

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

n/a

  1. Mention any other details that might be useful.

n/a

@mrgoos
Copy link

mrgoos commented Sep 25, 2016

Could be duplicate of #2028?

@mwawrusch
Copy link
Author

@mrgoos I think it's different, after further investigation I noticed that some chunks are gzipped, others not

-rw-r--r--   1 mwawrusch  staff     2981 Sep 25 05:58 0.59ea61d3b756000074ac.chunk.js
-rw-r--r--   1 mwawrusch  staff    57620 Sep 25 05:58 012cf6a10129e2275d79d6adac7f3b02.woff
-rw-r--r--   1 mwawrusch  staff   742949 Sep 25 05:58 054fa50baa6598a7bf0c6deec135d3a4.svg
-rw-r--r--   1 mwawrusch  staff   183252 Sep 25 05:58 056caeabe95749fe2b973bb9a0cd0776.ttf
-rw-r--r--   1 mwawrusch  staff    89432 Sep 25 05:58 081b11ebaca8ad30fd092e01451015dc.woff
-rw-r--r--   1 mwawrusch  staff    39810 Sep 25 05:58 1.42dcada3952637b70f07.chunk.js
-rw-r--r--   1 mwawrusch  staff    12614 Sep 25 05:58 1.42dcada3952637b70f07.chunk.js.gz
-rw-r--r--   1 mwawrusch  staff   185004 Sep 25 05:58 11b5cc9584f2c007a22966a031ead20e.ttf
-rw-r--r--   1 mwawrusch  staff    21893 Sep 25 05:58 183079184d96a491f16e3cc70414975d.eot
-rw-r--r--   1 mwawrusch  staff   767510 Sep 25 05:58 1a9e39e536aed26b863b243e68f97e3a.svg
-rw-r--r--   1 mwawrusch  staff   776042 Sep 25 05:58 1f37c7545ae9f63d2279f99875678396.svg
-rw-r--r--   1 mwawrusch  staff    17374 Sep 25 05:58 2.ff4ce882dc16f9a25557.chunk.js
-rw-r--r--   1 mwawrusch  staff     6098 Sep 25 05:58 2.ff4ce882dc16f9a25557.chunk.js.gz

@deebloo
Copy link
Contributor

deebloo commented Sep 26, 2016

@mwawrusch I think this may be down to how large the chunks are. I know that there is a threshold where compressing the file will actually hurt performance. I would check and see how large the chunks are and see if they are gzipped as they get bigger.

@mwawrusch
Copy link
Author

mwawrusch commented Sep 26, 2016

That seems like a reasonable assumption, as only the smaller files are kept unzipped.
I propose to always zip files or to expose the zip threshold.

@filipesilva
Copy link
Contributor

Closing as dupe of #2028, better to keep gzip discussion there.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants