Added the esbuild-loader
for JavaScript files to speed up rebuilding the manual and automated tests
#770
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Suggested merge commit message (convention)
Other (tests): Added the
esbuild-loader
for JavaScript files to speed up rebuilding the manual and automated tests.❗Please read the description below before trying to merge this PR.
TL;DR: In my opinion it is not worth it, as the profit is no or negligible. Probably moving fully to the
esbuild
fromwebpack
would accelerate all things, but this is another story (for another issue).Let's start with the raw results. The table below shows the average time needed to compile the tests. Each result is the average value calculated of 5 runs.
ckeditor5-engine
ckeditor5-image
ckeditor5-list
ckeditor5-alignment
1 There is a workaround to prevent it from crashing by running
yarn run manual --disable-watch
.Manual tests
In manual tests, there is a benefit in using
esbuild-loader
only for packages that contain a lot of tests. For theckeditor5-engine
package it is about 30% and for theckeditor5-image
- around 15%. For other packages where the are less tests, no measurable difference can be noticed. Before and after the change, the compilation time can be assumed as the same.One unexpected advantage of the
esbuild-loader
in manual tests is that we can suddenly build all of your manual tests at once. Previously, without the new loader, it is not possible and theyarn run manual
script crashes and burns in an epic manner. On the other hand, we are still also able to build all manual tests in the old way withyarn run manual --disable-watch
, which means that files are not watched and the source maps are not generated, but who would like the active watcher and source maps when running all manual tests?The big downside of using this
esbuild-loader
is that it removes all comments from source maps and it can't be turned off. This is not acceptable.In conclusion, despite some (but not significant) acceleration in large packages, I don't see any point in integrating the
esbuild-loader
into manual test tooling.Automated tests
In automated tests, the results before and after the changes are practically the same so I also don't see any point in integrating the
esbuild-loader
into the tooling.