-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[AssetMapper] Split ImportmapManager into 2 #52120
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
[AssetMapper] Split ImportmapManager into 2 #52120
Conversation
| ->set('asset_mapper.importmap.command.require', ImportMapRequireCommand::class) | ||
| ->args([ | ||
| service('asset_mapper.importmap.manager'), | ||
| param('kernel.project_dir'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argument wasn't used - unrelated to this PR
| /** | ||
| * Provides data needed to write the importmap & preloads. | ||
| */ | ||
| class ImportMapGenerator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class is a copy-and-paste of methods from ImportMapManager with very few changes
aace3f1 to
44cee27
Compare
44cee27 to
47a5600
Compare
|
The changelog should probably mention this change |
47a5600 to
da648b1
Compare
|
Thank you @weaverryan. |
Hi!
Just a simple "copy-and-paste" of methods from
ImportMapManagerto a newImportMapGenerator. The motivation is performance:ImportMapGeneratoris instantiated on production on every request, so this PR results in 2 unnecessary services (RemotePackageDownloaderandJsDelivrEsmResolver) no longer being instantiated.Thanks!