Is COUNT(*) slow in MySQL?
– aaronfrancis.com - submitted by Aaron Francis
Spoiler: it is optimized to be fast, and you should use it.
Read more [aaronfrancis.com]
– aaronfrancis.com - submitted by Aaron Francis
Spoiler: it is optimized to be fast, and you should use it.
Read more [aaronfrancis.com]
While working on the upcoming Oh Dear redesign, I noticed that list that displays all sites of a team was very slow.
To display that list, a lot of queries were used. With a couple of minor adjustments, I could reduce the number of queries needed to just a single one, solving the performance problem.
In this small blog post, I'd like to share one of the techniques I used.
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"I’ve been reading freeks newsletter for a while now, and it’s easily one of my favorite developer newsletters. Freek shares practical, no-nonsense insights from running Spatie, maintaining hundreds of open-source packages, and shipping real products. Every time I get useful Laravel tips, smart tooling advice, always high quality and immediately applicable."
I wonder if Laravel should use this technique by default. It seems to have a major positive impact on performance.
Read more [aaronfrancis.com]
Airdrop determines when you can skip building static assets, saving a LOT of time and server resources in continuous integration and deployment.
Read more [chipperci.com]
– siipo.la - submitted by Peter
What’s the best lossless image format? Comparing PNG, WebP, AVIF, and JPEG XL
Read more [siipo.la]
– tray2.se - submitted by Patrik Ahlström
You might think that the way your store your data isn't really that important. Well it's more important than you think it is. A good database design just like good clean code is the key to performance, not only for the end user but also for you the developer. A poor database model just like poorly written code will slow you down and furthermore it will slow your database queries down which results in a slow application.
Read more [tray2.se]
– barryvanveen.nl - submitted by Barry van Veen
I made a script to easily take consistent measurements using Apache Benchmark. It includes an easy way to compare multiple measurements in a visual way.
Read more [barryvanveen.nl]
– aaronfrancis.com - submitted by Aaron Francis
A slight modification to traditional offset/limit pagination that can drastically boost performance.
Read more [aaronfrancis.com]
By thinking outside of the box, you can often get much faster database performance by splitting values across multiple database columns.
Read more [downing.tech]
– aaronfrancis.com - submitted by Aaron Francis
A clever use of MySQL indexes and generated columns to make blazing fast geolocation searches.
Read more [aaronfrancis.com]
– timacdonald.me - submitted by Tim Mac
Introduce lazy loading to an existing application without interrupting flow or overwhelming your logs
Read more [timacdonald.me]
Oh Dear is all-in-one solution to monitor your site that my buddy Mattias Geniar and I have created. It can monitoring uptime, certificates, broken links, scheduled jobs, and much more.
Under the hood, Oh Dear is a large Laravel application that performs many queries all of the time. To power future features, we've recently changed our database structure and refactored some pieces in our code base. We increased performance by decreasing the number of queries.
In this blog post, we'd like to to share some techniques that might be helpfull to increase the performance of your Laravel app too.
Matt Stauffer on how to minimize Vue's impact on the Core Web Vitals?
Read more [mattstauffer.com]
Mohamed shows how you can deal with N+1 problems using the $with model attribute and the newly added Model::preventLazyLoading() method.
Benjamin Eberlei tells the story of a performance mistake that is quickly made even by experienced developers.
Read more [tideways.com]
Tobias explains how you can make this operation very fast even if your table has several million records.
Read more [tpetry.me]
– tighten.co - submitted by Jamison Valenta
Here are some hot tips for mapping large datasets on Google Maps, without sacrificing performance.
Read more [tighten.co]
Response caching is like a progressive enhancement. It will make your app faster in some ways, and some cases, but your app must work perfectly well without it.
Read more [samuelstancl.me]
If you're running your queue workers on a server with limited resources, or a server that's also used to serve HTTP requests and do other tasks, it's important to ration the resource used by those workers.
Read more [divinglaravel.com]
In this post 8 image loading optimization techniques are outlined to minimize both the bandwidth used for loading images on the web and the CPU usage for image display.
Read more [www.industrialempathy.com]