How to half the size of your Spryker vendor directory
I had a bit of a shock today while checking the size of our Spryker install. Naturally the vendor
directory was the biggest but one particular module stands out:
du -sh vendor/spryker
395M vendor/spryker
du -sh vendor/spryker/chart
173M vendor/spryker/chart
Unless I'm looking at this wrong, the chart module is nearly making up half the size of the entire core Spryker codebase!
The actual chart module is not too big itself and looks innocent until the webpack assets are compiled
du -sh vendor/spryker/chart/assets/Zed/node_modules
172M vendor/spryker/chart/assets/Zed/node_modules
I know disk space is cheap and it is not really hurting us, but as engineers we should support the
and aim to keep our digital footprint as small as possible.For our particular project I think this module is only used for the Backoffice dashboard and for us this data is already in our BI systems so we could consider removing this module.
If we do this it will certainly save a bit of time in our CI pipelines, with less to download and compile.
Update: I just noticed there was an update to this module in the last day so maybe this is already optimised - something we can also check.
Just posting this here incase others are looking to save some space, or have other thoughts on reducing the application footprint.
Comments
-
Hey @Rick Peacock ,
Thank you so much for your feedback, I have passed this on to our team 🙌1 -
Good suggestion!
0 -
Hello @Rick Peacock ,
Thank you for bringing this to our attention.The current Spryker frontend builder uses the npm workspaces, which avoids duplicating node modules and shares them from the root
node_modules
folder.I’ve checked the current B2B demo shop and the sizes are:
du -sh vendor/spryker
179M vendor/spryker
du -sh vendor/spryker/chart
272K vendor/spryker/chartPlease follow the migration guides to update the FE builder:
Switch from Yarn to npm v8
Upgrade Node.js to v18 and npm to v90
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random