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

make follow reexports more efficient #7741

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

sokra
Copy link
Member

@sokra sokra commented Mar 15, 2024

Description

When accessing many exports of a barrel file with many export * it was a bit inefficient before since it was walking all star exports for every accessed export.

After this change it only creates a map of the star exports once and accessing every export only looks up the result in the map. This makes it 4 times more efficient for a file with 140 export *. Probably even more for bigger barrel files.

Testing Instructions

Closes PACK-2747

Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview Mar 15, 2024 4:47pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 4:47pm
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-gatsby-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-native-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-svelte-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-tailwind-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm
examples-vite-web ⬜️ Ignored (Inspect) Mar 15, 2024 4:47pm

Copy link
Contributor

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Mar 15, 2024

🟢 CI successful 🟢

Thanks

@sokra sokra merged commit 39bb0bd into main Mar 18, 2024
50 checks passed
@sokra sokra deleted the sokra/more-efficent-follow-reexports branch March 18, 2024 06:38
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

When accessing many exports of a barrel file with many `export *` it was
a bit inefficient before since it was walking all star exports for every
accessed export.

After this change it only creates a map of the star exports once and
accessing every export only looks up the result in the map. This makes
it 4 times more efficient for a file with 140 `export *`. Probably even
more for bigger barrel files.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->


Closes PACK-2747
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

When accessing many exports of a barrel file with many `export *` it was
a bit inefficient before since it was walking all star exports for every
accessed export.

After this change it only creates a map of the star exports once and
accessing every export only looks up the result in the map. This makes
it 4 times more efficient for a file with 140 `export *`. Probably even
more for bigger barrel files.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->


Closes PACK-2747
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

When accessing many exports of a barrel file with many `export *` it was
a bit inefficient before since it was walking all star exports for every
accessed export.

After this change it only creates a map of the star exports once and
accessing every export only looks up the result in the map. This makes
it 4 times more efficient for a file with 140 `export *`. Probably even
more for bigger barrel files.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->


Closes PACK-2747
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

When accessing many exports of a barrel file with many `export *` it was
a bit inefficient before since it was walking all star exports for every
accessed export.

After this change it only creates a map of the star exports once and
accessing every export only looks up the result in the map. This makes
it 4 times more efficient for a file with 140 `export *`. Probably even
more for bigger barrel files.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->


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

Successfully merging this pull request may close these issues.

2 participants