blade-ui-kit / blade-heroicons

A package to easily make use of Heroicons in your Laravel Blade views.
https://blade-ui-kit.com/blade-icons
MIT License
551 stars 50 forks source link

high memory usage #44

Closed saeedvaziry closed 8 months ago

saeedvaziry commented 8 months ago

Description:

The library tries to load all of the icons into the memory in the ServiceProvider which causes to increase the memory consumption of the server.

Steps To Reproduce:

compare the memory usage of a fresh Laravel app with and without having this package installed and autoloaded.

driesvints commented 8 months ago

Did you read the docs here and applied config caching? https://github.com/blade-ui-kit/blade-icons#caching

saeedvaziry commented 8 months ago

Hmm, somehow I missed that part. gonna take a look at that to see how it improves the memory usage

saeedvaziry commented 8 months ago

So my local says that was it!

Normally it uses 2MB locally and after installing the package it goes to 5MB but after caching it it goes down to 2MB per request so I assume caching helps here.

Will test it on PROD as well but I guess we can close this issue.

Thanks