Silvanite / novatoolpermissions

Laravel Nova Permissions Tool (User, Roles and Permissions / Access Control (ACL))
MIT License
101 stars 33 forks source link

Fix memory usage when listing roles increasing with user count #60

Open henrikgamerzclass opened 3 years ago

henrikgamerzclass commented 3 years ago

We recently ran into this issue because we have roles attached to more than 86.000 users. The way each role's user count was calculated would load the full user model of all users that has a role, which caused our containers to run out of memory.

This fix changed our memory usage from 1197 MB to 2 MB.

m2de commented 3 years ago

Thanks very much for your contribution, will get this merged in this afternoon.

henrikgamerzclass commented 3 years ago

Sorry for rushing, but is there an ETA on this one?