Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster execution by proposing an alternative to barrel files #4324

Open
dubzzz opened this issue Oct 16, 2023 · 2 comments
Open

Faster execution by proposing an alternative to barrel files #4324

dubzzz opened this issue Oct 16, 2023 · 2 comments

Comments

@dubzzz
Copy link
Owner

dubzzz commented Oct 16, 2023

🚀 Feature Request

About barrels:

Help to achieve our goal: https://github.com/gajus/eslint-plugin-canonical

How to measure the improvement? Our own test time before vs after. Hope we will have something noticeable.

@dubzzz dubzzz changed the title Faster execution by dropping barrel diles Faster execution by dropping barrel files Oct 16, 2023
@dubzzz
Copy link
Owner Author

dubzzz commented Oct 20, 2023

I quickly assessed the idea against a naive test (one js spec file containing an empty test) running with Jest runner on one of my machines:

  • without any imports: 0.5s
  • with full import: 0.8s
  • with only the file exposing assert: 0.6s

While the figures need to be re-assessed closely, there is definitely something to dig.

@dubzzz dubzzz changed the title Faster execution by dropping barrel files Faster execution by proposing an alternative to barrel files Oct 25, 2023
@dubzzz
Copy link
Owner Author

dubzzz commented Oct 25, 2023

Such import strategy would require exports map in package.json to be fully supported both by node and tsc for TypeScript users. It would probably require me to select the right version range for my next major of fast-check so that this change will be feasible.

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

No branches or pull requests

1 participant