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

Remove large and unneeded resources #6437

Merged
merged 1 commit into from
Oct 4, 2020

Conversation

jorrit
Copy link
Contributor

@jorrit jorrit commented Oct 1, 2020

Subject

I am trying to optimize the size of my Docker container and a quick review using WinDirStat gave some surprising large files in src/Resources/private/SonataCoreBundleAssets/vendor:

  • moment/min/tests.js: 3.3 MB
  • ionicons/cheatsheet.html: 1.2 MB
  • eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe: 1.6 MB

These files are copied to public on assets:install so they count twice if sym/hardlinking is not available. I think that these files are unnecessary under any circumstance and can be removed without breaking the backwards compatibility promise. Many more files could be removed, but the ones above are the largest by a wide margin.

I am targeting this branch, because no user should depend on these files.

Changelog

### Removed
- Removed several large unnecessary resources from public/bundles/sonatacore/vendor.

VincentLanglet
VincentLanglet previously approved these changes Oct 1, 2020
@VincentLanglet VincentLanglet requested a review from a team October 1, 2020 22:38
core23
core23 previously approved these changes Oct 2, 2020
@jordisala1991
Copy link
Member

Those assets are handled by bower, so if someone updates packages they will appear again

@VincentLanglet
Copy link
Member

Those assets are handled by bower, so if someone updates packages they will appear again

I'm not sure we're doing that often

@jorrit
Copy link
Contributor Author

jorrit commented Oct 2, 2020

I could add a .gitignore to the SonataCoreBundle directory excluding these files so they will never be committed again.

@VincentLanglet
Copy link
Member

VincentLanglet commented Oct 2, 2020

I could add a .gitignore to the SonataCoreBundle directory excluding these files so they will never be committed again.

I like this idea, WDYT @jordisala1991 ?

Also add a .gitignore file to prevent these files from being added again
@jorrit jorrit dismissed stale reviews from core23 and VincentLanglet via d9a5f8e October 2, 2020 07:28
@jorrit
Copy link
Contributor Author

jorrit commented Oct 2, 2020

I've added the .gitignore file.

@VincentLanglet VincentLanglet requested review from a team and jordisala1991 October 4, 2020 10:20
@jordisala1991 jordisala1991 merged commit d8547db into sonata-project:3.x Oct 4, 2020
@jordisala1991
Copy link
Member

Thank you @jorrit

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

Successfully merging this pull request may close these issues.

5 participants