[9.2] chore(NA): improve performance of kibana dev/build distributable (#256377)#258262
Merged
mistic merged 5 commits intoelastic:9.2from Mar 18, 2026
Merged
[9.2] chore(NA): improve performance of kibana dev/build distributable (#256377)#258262mistic merged 5 commits intoelastic:9.2from
mistic merged 5 commits intoelastic:9.2from
Conversation
…stic#256377) Closes elastic/kibana-operations#468 This PR reduces the kibana distributable build time by ~2 minutes through targeted tool replacements and concurrency improvements. - **JS/CSS minification:** Replaced gulp-terser and gulp-postcss with @swc/core (the one used at rspack) and lightningcss (also used at rspack) for asset optimization. Parallelized Brotli compression across files. Lowered Brotli quality from 11 to 9. - **Archive creation:** Replaced archiver with tar-fs + native zlib.createGzip. Lowered gzip level from 9 to 6. - **Concurrency tuning:** Scaled asyncForEachWithLimit in build_packages_task.ts to cpus().length. Added missing default concurrency to scanDelete. Added mergeMap concurrency caps in scanCopy. - **Copy-on-Write:** Enabled COPYFILE_FICLONE in scanCopy for instant reflink copies on supported filesystems. **Regarding new dependencies:** **Purpose:** The new dependencies are going to be used in tasks related with optimizing distributable assets (code and css minification) and also producing gzip files. **Justification:** The ones we had before (mainly terser) were not suited for the job in terms of performance and the new ones are already aligned with what we will want and use for the new optimizer being planned itself. **Alternatives explored:** Those are the ones being used by RSPack itself which is the technology we want to use for bundling going forward. No others were explored. **Existing dependencies:** It does but mostly points to the legacy old known dependencies used in the webpack environment itself. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added new JS/CSS tooling and packaging packages, install hook entry, and automated update rules. * Extended license allowlist. * **Performance** * Improved parallelism across build steps, capped to CPU count and added pipeline limits. * Switched to per-file minification/compression, changed archive packing flow, and lowered gzip compression level for faster builds. * **Tests** * Added integration tests validating archive creation, contents, and file counts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 3750017) # Conflicts: # .buildkite/scripts/steps/security/third_party_packages.txt # package.json # renovate.json # yarn.lock
…ally, or add an exception to src/dev/yarn_deduplicate/index.ts and then commit the changes and push to your branch
…ally, or add an exception to src/dev/yarn_deduplicate/index.ts and then commit the changes and push to your branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport
This will backport the following commits from
mainto9.2:Questions ?
Please refer to the Backport tool documentation