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

Optimize implicit-modules graph #2161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Nov 1, 2024

The implicit-modules backward compatibility feature is implemented by a graph of virtual modules, one per addon, where each addon's virtual module imports the virtual modules from its addon dependencies. This works well because it allows every implicit module to get imported from the right place in the package graph.

But many addons don't need this feature, so you end up with many empty modules. This causes unnecessary network requests in development.

We can optimize by looking ahead recursively and not emitting imports for modules that won't have anything in them. This prunes back the graph to the minimum size.

The `implicit-modules` backward compatibility feature is implemented by a graph of virtual modules, one per addon, where each addon's virtual module imports the virtual modules from its addon dependencies. This works well because it allows every implicit module to get imported from the right place in the package graph.

But many addons don't need this feature, so you end up with many empty modules. This causes unnecessary network requests in development.

We can optimize by looking ahead recursively and not emitting imports for modules that won't have anything in them. This prunes back the graph to the minimum size.
@ef4 ef4 added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant