snipe-it/app/Http
Jeremy Price 2adc4ffa96 Fix memory-hog query in AssetCountForSidebar middleware
https://github.com/snipe/snipe-it/pull/14702/files introduced a bug
where instead of doing a quick `select count(*)` of assets, it did a `select *` of
assets, moving the count from the database to the PHP process.

This caused OOM issues in memory-constrained environments with lots of
assets, and also presented a speed issue even when memory limited were
increased.

Additionally, given this populates the sidebar, this was likely an issue
on every page load that included the sidebar.

The fix is simply removing the `all()->`, ending up with Asset::count(),
which yields the desired `select count(*)` DB query.
2024-05-10 12:54:40 -07:00
..
Controllers Handle user not found properly 2024-05-07 19:16:56 +01:00
Livewire Remloved unneeded validation message 2024-03-07 23:40:30 +00:00
Middleware Fix memory-hog query in AssetCountForSidebar middleware 2024-05-10 12:54:40 -07:00
Requests Add additional condition 2024-04-25 17:04:07 -07:00
Traits Improve trait name 2024-02-27 12:06:29 -08:00
Transformers Removed debugging 2024-05-07 17:40:48 +01:00
Kernel.php Log user out of other devices when they change their password 2022-08-25 12:24:26 -07:00