gtop: a system monitoring dashboard for terminal
To view some real time statistics of your server you use top or htop. But there's a new new kid on the block: gtop. It looks pretty nice.
Posts tagged with performance
To view some real time statistics of your server you use top or htop. But there's a new new kid on the block: gtop. It looks pretty nice.
In an older post on his blog Mohamed Said demonstrates how you can leverage virtual columns to speed up queries on data stored as JSON.
Laravel 5.3 is shipped with built-in support for updating and querying JSON type database fields, the support currently fully covers MySQL 5.7 JSON type fields updates and lookups,...
Let's see how we may create a generated column to store users favorite color for later indexing.
https://themsaid.com/laravel-mysql-json-colum-fast-lookup-20160709
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.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
Adam Silver lists a bunch of problems you need to solve if you opt to build a single page application.
Ironically, SPAs are harder to design and harder to build. And yet, they typically produce slow, disagreeable experiences for users. ... Javascript is never going to beat the browser at what it does best—browsing. We can still give users rich and enhanced experiences without cramming an entire site into one document.We should let the browser manage the browsing experience, and spend our time solving real user problems.
https://adamsilver.io/articles/the-disadvantages-of-single-page-applications/
Logan Henson, a developer at Tighten, wrote a new post on the company blog about MySQL's cool ST_Distance_Sphere function.
On a client project recently, we had to make it easy to filter database query results based on the distance between a user and an entity in our database. It's easy to get overwhelmed in that context, worrying about the crazy amount of PHP calculations you're going to have to run. ... If you need to calculate this, you can actually get surprisingly far by just using MySQL!
https://tighten.co/blog/a-mysql-distance-function-you-should-know-about
A while ago we released image-optimizer. In short this package can make all kinds of images smaller by stripping out metadata and applying a little bit of compression. Read this blogpost to learn more about it. Although it's pretty easy to work with the package, we felt that we could deliver a more…
Our recently released image-optimizer package can shave off some kilobyes of PNGs, JPGs, SVGs and GIFs by running them through a chain of various image optimization tools. In this blog post I'll tell you all about it. First, here's a quick example on how you can use it: use…
Like this simple new addition coming in Laravel 5.4.28, it's handy for when you need to eager-load related models of a collection on the go. pic.twitter.com/0W3hqG97BR
— Mohamed Said (@themsaid) June 21, 2017
Read more [twitter.com]
Chris Fideo, of Servers For Hackers and Shipping Docker, published a new free video serious on optimizing performance for Laravel apps. He shows how to use the built in artisan commands such as config:cache and route:cache,how to optimize queries, build up good indexes and how to add an object cache in a clean way.
There are some super common reasons your Laravel app might be slow. This course shows you how to avoid speed issues with simple changes you can implement immediately.
https://serversforhackers.com/laravel-perf
Chris is also a working on a paid course on how to scale Laravel apps. If you want to stay in the loop for that one, subscribe to his newsletter.
Recently this button to optimize PHP's OPcache was added to Laravel Forge.
If you were wondering what PHP OPcache is all about and what pressing this button does with your application, read this article Olav van Schie wrote on the subject a while ago.
Every time you execute a PHP script, the script needs to be compiled to byte code. OPcache leverages a cache for this bytecode, so the next time the same script is requested, it doesn’t have to recompile it. This can save some precious execution time, and thus make your app faster (and maybe save some server costs).
https://medium.com/appstract/make-your-laravel-app-fly-with-php-opcache-9948db2a5f93
For quite some time, I've been enjoying the DevTools tips that Umar Hansa mails out weekly. I was happy to learn that Umar is also working on a video course focussing on the DevTools. Recently the first video, on image performance on the web, was released.
Check out the course here: https://moderndevtools.com/
Even though I'don't like Facebook as a user, their amazing contributions to open source are something to be very grateful for. Last week they presented their new work in progress: Prepack.
Prepack is a tool that optimizes JavaScript source code: Computations that can be done at compile-time instead of run-time get eliminated. Prepack replaces the global code of a JavaScript bundle with equivalent code that is a simple sequence of assignments. This gets rid of most intermediate computations and object allocations.
It's still in development, so best not use it in production environments yet.
Mohammed Said, Laravel employee #1 and diver, explains how you can avoid pushing unnecessary jobs to a queue.
How many customers will reach the 10K purchase milestone? does it make sense to push a Job to queue for every single purchase while there's a huge chance that this job will just do nothing at all? IMHO this is a waste of resources, you might end up filling your queue with thousands of unnecessary jobs.It might be a good thing if we can check for that condition before queueing the listener.
http://themsaid.com/conditionally-queue-listeners-laravel-20170505/
Danny Van Kooten did an interesting experiment. He completely rewrote an Laravel app to a version in Go. In a post on his blog he shares some details about his project along with some benchmarks.
Earlier this year, I made an arguably bad business decision. I decided to rewrite the Laravel application powering Boxzilla in Go.No regrets though.
Just a few weeks later I was deploying the Go application. Building it was the most fun I had in months, I learned a ton and the end result is a huge improvement over the old application. Better performance, easier deployments and higher test coverage.
On the madewithlove blog Frederick Vanbrabant wrote a post on how he and colleague improved the PWA score of their company site.
So the first thing you should know about PWA (or progressive web apps) is that it’s an adaptation of your current site or web app. This means that if you want to have all the features of a progressive web app, you are going to need to change your current site/application. The good news here is that they are all changes you would want to have anyway.
On his blog Frank De Jonge explains how he solved a performance problem in one of his projects.
Last week I took a deep dive into Symfony's Routing Component. A project I worked on suffered from a huge performance penalty caused by a routing mistake. This lead me on the path to discovering some interesting performance considerations. Some common practices align nicely with Symfony's optimisations, let's look into those.
https://blog.frankdejonge.nl/symfony-routing-performance-considerations/
In a short blogpost Michael Dyrynda gives some good advice on why you should cache your routes and config values.
As part of the recommended production deploy process it is important to run the caching commands that Laravel affords us via Artisan. This means running config:cache and route:cache, which will compile the config and route files down into a single file each.In doing so, Laravel aims to speed up parsing of these files by only needing to read a single, rather than multiple files.
https://dyrynda.com.au/blog/environment-variables-config-caching-and-laravel
If you want to learn Varnish Thijs Feryn wrote a book for you. It's free to download until 7th March 2017.
Getting Strated with Varnish Cache is a technical book about the Varnish caching technology. Varnish is a so-called reverse caching proxy that acts as an intermediary between the browser and the webserver. Varnish stores HTTP responses and serves them to the browser, without accessing the backend for every request. This causes a massive speed increase.
Apart from our open source work, we do client work at Spatie as well. Over the years we've learned that one of the most critical moments of a project is when it is going live. No matter how you confident you are about the correctness of the code base there are so many big and little things that…
For a project we're working on at Spatie we're expecting high traffic. That's why we spent some time researching how to improve the request speed of a Laravel application and the amount of requests a single server can handle. There are many strategies and services you can use to speed up a site. In…
David Gilbertson made a lighting fast site and wrote a fantastic article about it.
Writing a fast website is like raising a puppy, it requires constancy and consistency (both over time and from everyone involved). You can do a great job keeping everything lean and mean, but if you get sloppy and use an 11 KB library to format a date and let the puppy shit in the bed just one time, you’ve undone a lot of hard work and have some cleaning up to do.
https://hackernoon.com/10-things-i-learned-making-the-fastest-site-in-the-world-18a0e1cdf4a7