cwa-website
cwa-website copied to clipboard
eventregistration.js triggers build warning regarding size limit
Where to find the issue
https://github.com/corona-warn-app/cwa-website/blob/master/src/assets/js/eventregistration.js
Describe the issue
When the website is built through https://github.com/corona-warn-app/cwa-website/blob/master/.github/workflows/build.yml a warning is shown regarding eventregistration.js.
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
eventregistration.js (658 KiB)
For example the pull request https://github.com/corona-warn-app/cwa-website/pull/1167 triggered the action which is shown in the logs under https://github.com/corona-warn-app/cwa-website/actions/runs/788829128. Here is the relevant part of the log:
Built at: 04/27/2021 11:00:24 AM
Asset Size Chunks Chunk Names
app.js 139 KiB 0 [emitted] app
eventregistration.js 658 KiB 1 [emitted] [big] eventregistration
Entrypoint app = app.js
Entrypoint eventregistration [big] = eventregistration.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
eventregistration.js (658 KiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
eventregistration (658 KiB)
eventregistration.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Suggested change
Please consider if something should be done to avoid this warning appearing.
Internal Tracking ID: EXPOSUREAPP-13404
It seems that #1575 may partially address this issue.
PR #1772 causes the warning to no longer appear
[17:42:45] Version: webpack 4.46.0
Built at: 29/09/2021 17:42:45
Asset Size Chunks Chunk Names
app.js 140 KiB 0 [emitted] app
eventregistration.js 679 KiB 1 [emitted] [big] eventregistration
screenshots.js 90.1 KiB 2 [emitted] screenshots
Entrypoint app = app.js
Entrypoint eventregistration [big] = eventregistration.js
Entrypoint screenshots = screenshots.js
eventregistration.js is still labelled as [big] though.
It seems that performance hints have been disabled:
https://github.com/corona-warn-app/cwa-website/blob/8d3a36a769375f4be50461052ff23cb87acc0fad/gulpfile.js#L270-L272
https://webpack.js.org/configuration/performance/#performancehints
Closing, since the symptoms no longer appear.
PR https://github.com/corona-warn-app/cwa-website/pull/1774 reverted the change to gulpfile.js which suppressed the performance warning from webpack, so this issue is re-opened.
I wonder if the label bug is correct here, as this is not a bug, or? The warning message appears as intended.
@Ein-Tim
I wonder if the label bug is correct here, as this is not a bug, or? The warning message appears as intended.
This is a question for a JavaScript expert.
"bug" is the correct label until an expert qualifies the issue and says it can be dismissed or the issue has been addressed. The Open Source Team has so far not responded.
In the meantime the npm run build reports that eventregistration.js has grown even further in size
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
eventregistration.js (993 KiB)
and that there is a problem additionally with cwaa.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
cwaa.js (813 KiB)
Lighthouse shows a performance impact due to JavaScript size in mobile mode for the Event registration page https://www.coronawarn.app/en/eventregistration/.
The most improvement however would be gained through enabling text compression.
- See open issue https://github.com/corona-warn-app/cwa-website/issues/60
Steps to reproduce report
- Open https://www.coronawarn.app/en/eventregistration/ in Google Chrome Incognito mode
- Press F12
- Select Performance and Mobile or Desktop, then click on Generate report
| Device | Lighthouse Performance score (0-100) |
Highest opportunity |
|---|---|---|
| Mobile | 58 | Enable text compression |
| Desktop | 97 | Enable text compression |
@MikeMcC399 Thank you for reporting the issue and all the information. Internal Tracking ID: EXPOSUREAPP-13404
@MikeMcC399 Just FYI, we had forwarded the issue, however were told that enable compressing would request to much ressources on CDN side, and that it would not be implemented.
@dsarkar
Thank you for the update. I had closed this issue assuming that there would be no more work done on performance due to ramp down.