Attributed metadata history
Up to 100 retained publisher events per page for 1a5b3dafc00c53cd77e2f686d8a3d77fd571a4e1e9b6318575d119d19385e38a. Withdrawals and unavailable references remain attributed to their publishers.
intelligence_src_6dc544294b7f21f98a
observed · 2026-11-26 17:53:03 UTC
My Laravel app worked fine for months. Then the users table passed 50,000 rows, the posts page started taking four seconds to load, and a nightly export job started dying with "Allowed memory size exhausted" at 3 a.m. I did not rewrite the app. I did not add Redis. I changed four Eloquent habits, and the same pages got fast again. Here is what actually helped, in the order that mattered most. 1. Eager loading fixed the biggest slowdown The posts page looped over posts and read $post->user->name inside the loop. That is the classic N+1 problem: one query for the posts, then one extra query per post. With 100 posts, the page ran 101 queries. // Before: 101 queries $posts = Post::all(); // After: 2 queries $posts = Post::with('user')->get(); One word — with('user') — cut the page load from four seconds to under half a second. If your page touches a relationship inside a loop, this is always the first thing to check. Laravel Telescope shows the query count per request, which makes the problem impossible to miss once you look. 2. exists() instead of count() for simple checks My code checked whether an email was already registered with coun
Fingerprint: a3bbc65a4b96daa0c92d596215d24c950053a99c365b93bc11aab593e4faa5a7
intelligence_src_6dc544294b7f21f98a
observed · 2026-10-12 11:01:03 UTC
available
Fingerprint: 2faf9469031bd0e00603457ab86d15e2040aea06ef98482184945872c5cb389f