DEV Community

Discussion on: Why don't sites put more effort into web performance?

Collapse
 
xowap profile image
Rémy 🤖

Wild guess: to me there's two causes of bad performance.

  1. Upfront bad ideas. In my experience that includes:

    • Choosing bloated tools (example: Inbox is done with GWT and sucks up 1Gio of RAM... Let's keep in mind it's an email client, not a rocket simulator)
    • Not doing pagination (example: Gmail is fast because it only deals with 25 emails at once while Thunderbird tries to put everything in a list)
    • Tightly coupled code that has too many responsibilities (example: any Wordpress theme that also does coffee)
  2. Things that appear at scale

Point number 1 is fairly easy to avoid, at least with experience. Of course it involves taking a step back from the hype to do smart choices and applying a discipline to the way you code.

Now regarding point number 2, well... If your application is scaling up to this point you'll probably be able to pull some budget to face whatever problem you're facing.

As a general rule when I develop I try to work on low-performance devices that are at the edge of my target. And I mean, as my primary testing devices. That includes throttling the CPU, testing on an old phone, adding 1s latency on every API calls, etc. You're probably thinking that testing on this kind of device is annoying but in truth it's not if your performance is good :)