You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #52330 [AssetMapper] Fixing memory bug where we stored way more file content than needed (weaverryan)
This PR was merged into the 6.4 branch.
Discussion
----------
[AssetMapper] Fixing memory bug where we stored way more file content than needed
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes (on Symfonycasts, without this, `asset-map:compile` takes >500mb of memory)
| New feature? | no
| Deprecations? | none
| Issues | None
| License | MIT
Hi!
This drastically improves the memory footprint when ALL assets are built, which happens in `asset-map:compile`, `debug:asset-map`, etc. Blackfire is a huge fan! https://blackfire.io/profiles/compare/4eb36732-8805-4c49-b636-d4bf8f9e2b27/graph
The MAIN optimization by far is to set `MappedAsset.content` to null if the final, compiled content matches the source file's content. This is the case for the vast-majority of mapped assets, and so the result is MUCH less content stored in memory for no reason.
Thanks to `@smnandre` and his earlier PR, which allows for the `null` content on mapped assets.
Cheers!
Commits
-------
78ec570 [AssetMapper] Fixing memory bug where we stored way more file content than needed
0 commit comments