Skip to content

Add brotli size support #113

Closed
Closed

Description

@aldo-roman

This is a discussion issue to add Brotli size support on the report, side by side with gzip.
On the app we support, 78% of users surf the web with a brotli-enabled browser.
Global support is around 60%.
This will increase in the next days after macOS High Sierra and iOS 11 are launched.
See http://caniuse.com/#search=brotli

Also, in our tests, Brotli grants 10% more compression than Gzip.
We are developing a Angular CLI, Angular 4+ app.

I will be experimenting with a fork to add Brotli by replicating the Gzip size implementation.
Any suggestion and feedback is welcome.

Activity

  1. valscion commented on Sep 7, 2017

    @valscion
    Collaborator

    Huh, never heard of Brotli before 😄 . Awesome to learn new things!

    @th0r should be able to answer with any suggestions and feedback, when he's got time. I'd like to at least see a proof-of-concept of this Brotli support if possible ☺️

  2. th0r commented on Sep 7, 2017

    @th0r
    Contributor

    Never heard of Brotli as well. The only concern I have is the increasing of analyze time. Agree with @valscion here - it would be nice to see a proof-of-concept PR and comparison of analyze times with and without it.

  3. valscion commented on Sep 7, 2017

    @valscion
    Collaborator

    It might be possible to add brotli support if it would be calculated only when some CLI or plugin option would be there. That way it would not increase analyze time for those who don't yet care about Brotli.

  4. th0r commented on Sep 7, 2017

    @th0r
    Contributor

    👍

  5. aldo-roman commented on Sep 8, 2017

    @aldo-roman
    Author

    Hi guys, here there is the PR for Brotli support. It is working without problems on my setup. I couldn't include an opt-in option for the feature.

    Here is a screenshot on how this looks:
    image

  6. valscion commented on Sep 10, 2017

    @valscion
    Collaborator

    Neat! I think it'll be necessary to have an opt-in somehow, but currently it might require some architectural changes. Large changes would cause difficult merge conflicts with #97, though — I hope I could get that finished some day 😕

    I hope you're OK with using the Brotli support from your branch? It's a bit unlikely that we'll want to calculate these sizes by default as brotli isn't that widely used yet

  7. edmorley commented on May 15, 2018

    @edmorley
    Contributor

    If this does get implemented, please can the brotli related dependencies not be added to dependencies - to avoid issues like those in siddharthkp/bundlesize#202. (eg check for the dependencies at runtime and if not found and "brotli mode" enabled, output a suitable message.)

    Re Brotli itself, we happily use it on several production sites, however I'm not sure of the value of displaying brotli sizes in the analyzer, given:
    (a) brotli compression is much slower so would have much more of an impact on how long this plugin takes to run,
    (b) whilst not entirely linear, one would presume the size ratios of the bundle for gzip vs brotli would be close enough that it wouldn't really affect any decisions based on the results (eg deciding what changes to make to splitChunks settings).

  8. valscion commented on May 15, 2018

    @valscion
    Collaborator

    If this does get implemented, please can the brotli related dependencies not be added to dependencies - to avoid issues like those in siddharthkp/bundlesize#202. (eg check for the dependencies at runtime and if not found and "brotli mode" enabled, output a suitable message.)

    Huh, thanks for the pointer :)

  9. TheAlexLichter commented on Jan 18, 2019

    @TheAlexLichter

    That should be easier now that native Brotli support (https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V11.md#notable-changes) landed in Node.

  10. salztorte commented on Apr 3, 2019

    @salztorte

    Something new to this?

  11. valscion commented on Apr 3, 2019

    @valscion
    Collaborator

    #113 (comment)

    The only concern I have is the increasing of analyze time. Agree with @valscion here - it would be nice to see a proof-of-concept PR and comparison of analyze times with and without it.

    #113 (comment)

    It might be possible to add brotli support if it would be calculated only when some CLI or plugin option would be there. That way it would not increase analyze time for those who don't yet care about Brotli.

    #114 (comment)

    The crux is that we don't want this to increase analyze time, and this feature would have to be opt-in. Currently it might require some architectural changes, though, so it isn't that easy to do.

  12. 278kunal commented on Jul 29, 2019

    @278kunal

    When is this getting merged ?

  13. valscion commented on Jul 29, 2019

    @valscion
    Collaborator

    When someone who wants brotli size support does what we've described that needs to be done. See the comment right above yours.

  14. raphaelbs commented on Apr 9, 2020

    @raphaelbs

    I have the use-case that the pipeline analysis doesn't use gzip at all, it relies completely on brotli. It would be great if it had the ability to choose one of them.

  15. locked and limited conversation to collaborators on Feb 23, 2023
  16. converted this issue into a discussion #562 on Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions