Minify ES Modules files
After converting the `ui/` folder to ESM, there was a significant performance regression in terms of file size of the `resources.pak`. It turns out that we were not minifying ESM files, but we did do that before with Closure. Update the `copy_devtools_modules` to also invoke rjsmin to minify the JavaScript source code. Before: $ du -h -B K out/Default/resources.pak 12096K out/Default/resources.pak After: $ du -h -B K out/Default/resources.pak 11752K out/Default/resources.pak Before the original CL transforming `ui/` landed: $ du -h -B K out/Default/resources.pak 11860K out/Default/resources.pak This means that after converting `ui/` to ESM, we saved 90KB. We suspect this is because we are no longer transpiling to ES5, but instead serve source ES6. Bug: 1010910 Change-Id: I7dd07ff788d014e9f9a8e25e168c58c010cd00af Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837814 Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org> Reviewed-by:Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#702500}
Showing
Please register or sign in to comment