Skip to content

feat(@angular-devkit/build-angular): add estimated transfer size to build output report #22172

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

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

clydin
Copy link
Member

@clydin clydin commented Nov 16, 2021

When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files.

Initial Chunk Files           | Names         |  Raw Size | Estimated Transfer Size
main.51c3048e87eac4fd.js      | main          | 132.07 kB |                38.63 kB
polyfills.df676194f15dea6d.js | polyfills     |  36.20 kB |                11.47 kB
runtime.ab1d1f80a99b92f8.js   | runtime       |   1.05 kB |               601 bytes
styles.ef46db3751d8e999.css   | styles        |   0 bytes |                       -

                              | Initial Total | 169.33 kB |                50.69 kB

Closes: #21394

@clydin clydin added the target: minor This PR is targeted for the next minor release label Nov 16, 2021
@google-cla google-cla bot added the cla: yes label Nov 16, 2021
@clydin clydin force-pushed the estimated-transfer-size branch from 332609a to ea7abad Compare November 16, 2021 16:20
@clydin clydin marked this pull request as ready for review November 16, 2021 19:36
@clydin clydin requested a review from alan-agius4 November 16, 2021 19:36
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, other than one comment.

@alan-agius4 alan-agius4 added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 17, 2021
…uild output report

When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files.

Closes: angular#21394
@clydin clydin force-pushed the estimated-transfer-size branch from ea7abad to bc4018b Compare November 17, 2021 15:30
@clydin clydin removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Nov 17, 2021
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Nov 17, 2021
@dgp1130 dgp1130 merged commit bc85637 into angular:master Nov 17, 2021
@clydin clydin deleted the estimated-transfer-size branch November 19, 2021 21:30
@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 Dec 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show gzip compression size after build
3 participants