eui icon indicating copy to clipboard operation
eui copied to clipboard

Build EUI in parallel

Open tkajtoch opened this issue 8 months ago • 1 comments

Summary

The EUI package is currently built 5 times for each target separately using Babel. Babel is called synchronously for each target, making the build process longer than it has to be, often taking 5+ minutes just to build the package.

We want to speed up the process by parallelizing this work and making good use of multi-core machines. This is also a prerequisite for the watch mode work to speed up local development.

Acceptance criteria

  • The build script should be updated to run all babel processes in parallel

Current EUI build targets

  • CommonJS (lib)
  • ESM (es)
  • Optimize CommonJS (optimize/lib)
  • Optimize ESM (optimize/es)
  • Test env (test-env)

tkajtoch avatar Apr 25 '25 10:04 tkajtoch

@tkajtoch Just putting the execSync into Promise.all brings down the time by a lot:

yarn workspace @elastic/eui build 155.22s user 20.02s system 289% cpu 1:00.64 total

compared to:

yarn workspace @elastic/eui build 132.87s user 15.40s system 137% cpu 1:47.93 total

Would that be enough for watch mode? Could be worth looking into concurrently as well?

weronikaolejniczak avatar Apr 25 '25 11:04 weronikaolejniczak

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

github-actions[bot] avatar Oct 22 '25 16:10 github-actions[bot]

How is this stale if I just opened a PR linking the issue? 😅 The stale bot could use some work I think.

weronikaolejniczak avatar Oct 23 '25 09:10 weronikaolejniczak