Skip to content

Conversation

@weronikaolejniczak
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak commented Oct 15, 2025

Summary

Resolves #9050

Use explicit exports.

Why are we making this change?

To reduce the time tests take in Kibana CI. Jest tests load full EUI.

Before

node ./scripts/jest --config="x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js" --coverage=false --passWithNoTests --maxWorkers=3

Completed in 45.451s

image

After

node ./scripts/jest --config="x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js" --coverage=false --passWithNoTests --maxWorkers=3

Completed in 48.451s

image
node scripts/bench.js --config src/platform/packages/shared/kbn-jest-benchmarks/benchmark.config.ts

Completed in 104s

image

Impact to users

🟢 Should cause no regression.

QA

  • CI passes
  • Website works
  • Storybook works

@weronikaolejniczak weronikaolejniczak self-assigned this Oct 15, 2025
@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner October 15, 2025 16:23
@weronikaolejniczak weronikaolejniczak added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Oct 15, 2025
@weronikaolejniczak weronikaolejniczak marked this pull request as draft October 15, 2025 16:23
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @weronikaolejniczak

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @weronikaolejniczak

@tkajtoch
Copy link
Member

If I'm reading this correctly, this actually slowed down the test runs, right?

We should make sure to run tests with no caching of any sorts enabled if we want to compare results

@tkajtoch
Copy link
Member

[Thinking out loud] I'd be also curious to see if there's a measurable difference in FS reads 🤔

@weronikaolejniczak
Copy link
Contributor Author

@tkajtoch on the surface - yes. But @dgieselaar mentioned to see the improvement we'd need to enable lazy rewrites for EUI. If you had the time, maybe you could try it out in Kibana and benchmark?

@dgieselaar
Copy link
Member

@weronikaolejniczak sorry, this slipped into this week. I hope to get back to it early this week. I have a branch somewhere that also reports file reads as part of @kbn/bench - I'll have a look at that one so we can get evidence of the rewrite having an impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate removing wildcard exports to improve tests startup time

5 participants