Performance Icon

Performance

58 Stories
All Topics

Polina Gurtovaya Evil Martians

Images done right: Web graphics, good to the last byte

Polina Gurtovaya: Start taking graphics on the web seriously and boost your applications’ performance by learning the essentials about image formats, both modern and old-school. Dig into SVGs and adopt the latest and greatest tools to optimize your graphical content: both vector and raster. Study the theory behind digital images and how humans perceive them—to improve the experience for your users.

read more

Philip Walton philipwalton.com

Cascading cache invalidation

Turns out one of our asset caching best practices (content hashes in filenames + far-future expiry) has a serious flaws in it: In practice, changes to one of your source files almost always invalidates more than one of your output files—and this happens because you’ve added revision hashes to your filenames. Philip goes on to explain why this happens and then proposes 3 possible solutions. Good stuff 👌

read more

Shopify Engineering Icon Shopify Engineering

How to write fast code in Ruby on Rails

If I had to pick one engineering team to write up how they make (and keep) Rails running fast, it’d be Shopify’s. What a treat! Part of Shopify’s success with Ruby on Rails is an emphasis on writing fast code. But, how do you really write fast code? Largely, that’s context sensitive to the problem you’re trying to solve. Let’s talk about a few ways to start writing faster code in Active Record, Rails, and Ruby.

read more

Conrad Irwin blog.superhuman.com

Performance metrics for blazingly fast web apps

Measure it so you can improve it, but how? …performance metrics are surprisingly challenging to get right. On the one hand, it is hard to design metrics that accurately represent the user experience. On the other hand, it is difficult to make metrics that are usefully precise. As a result, many teams cannot trust their performance data. Even with accurate and precise metrics, the data is hard to use. How do we define “fast”? How do we balance speed and consistency? How do we quickly find regressions or see the impact of optimizations?

read more

CSS Wizardry Icon CSS Wizardry

Time to first byte — What is it? Why does it matter?

Harry Roberts writing on CSS Wizardry: One metric I feel that front-end developers overlook all too quickly is Time to First Byte (TTFB). This is understandable—forgivable, almost—when you consider that TTFB begins to move into back-end territory, but if I was to sum up the problem as succinctly as possible, I’d say: While a good TTFB doesn’t necessarily mean you will have a fast website, a bad TTFB almost certainly guarantees a slow one. Even though, as a front-end developer, you might not be in the position to make improvements to TTFB yourself, it’s important to know that any problems with a high TTFB will leave you on the back foot, and any efforts you make to optimises images, clear the critical path, and asynchronously load your webfonts will all be made in the spirit of playing catchup.

read more

Victor Zhou victorzhou.com

Minify Your SVGs

Victor Zhou uses a lot of SVGs on his blog. Do you? So now he optimizes their size as part of his build process. Do you? 62 SVGs minified, reducing the total size from 459322 bytes to 208897 bytes, a reduction of 54.5%! That’s a total of 250 KB, or 4 KB per SVG. Keep in mind that all of my SVGs were already saved in the Optimized SVG format - these savings were on top of already optimized SVGs. If you haven’t thought about minifying your SVGs before, chances are you’d see much more drastic results.

read more

Smashing Magazine Icon Smashing Magazine

Using the web for a day on a 50 mb budget

This is a fascinating look at how “size negligence”, AKA not paying close attention to the size of your images, javascript, etc impacts people in parts of the world where data is slow and expensive. Author Chris Ashton on why you should care: We don’t have the power to change the global cost of data inequality. But we do have the power to lessen its impact, improving the experience for everyone in the process.

read more

Tim Kadlec timkadlec.com

Web performance as exclusion?

Tim Kadlec writes about “The ethics of web performance” and the idea of web performance having ethical ramifications. When you look at the evidence, it’s hard to see one could argue performance doesn’t have ethical ramifications. So clearly, folks who have built a heavy site are bad, unethical people, right? Here’s the thing. I have never in my career met a single person who set out to make a site perform poorly. Not once. People want to do good work. But a lot of folks are in situations where that’s very difficult. The business models that support much of the content on the web don’t favor better performance. Nor does the culture of many organizations who end up prioritizing the next feature over improving things like performance or accessibility or security. I would argue the other angle, “Web performance as compassion” to show how you can show compassion for the users of your software through performance.

read more

Tom Warren The Verge

Slack’s new desktop app loads 33 percent faster and uses less RAM

Good news fellow Slack users, your productivity just got bumped by the perf gods of Slack thanks to their continued efforts and focus on the desktop app’s performance. Slack is unveiling a new version of its desktop app for Windows and macOS today that promises big performance improvements. Slack has rebuilt its desktop app to focus on speed, and the company claims Slack will now launch 33 percent faster than before. The Slack app will even use 50 percent less RAM than before, according to the company. Slack has been working on this overhaul for two years, slowly modernizing parts of its code along the way. While the desktop apps still run on Electron, all of the UI parts have been rebuilt using React to fix some of the shortcomings of the existing Slack app.

read more

Thoughtbot Icon Thoughtbot

Profiling Vim

Chris Thorn writing for Thoughtbot: Lately, I’ve noticed that opening Markdown files in Vim is slow. I don’t know exactly how slow, but slow enough that I notice a pause after opening the file before I can edit it. I’m not sure why or when it started, but it’s painful enough that I want to track down and alleviate it. I, too, have felt this pain, which is one of the reasons I no longer use Vim as my full-time coding editor. I still use it enough for its sluggishness to bug me, but not quite enough to go chasing down why it’s sluggish. This article might change my calculus on that decision.

read more

Addy Osmani v8.dev

The cost of JavaScript in 2019

An update from Addy Osmani about the impact of JavaScript on the web and performance in 2019, and things you can do to impact it. Interesting because the number one items to pay attention to have changed from the conventional wisdom of a couple years back. Osmani: One large change to the cost of JavaScript over the last few years has been an improvement in how fast browsers can parse and compile script. In 2019, the dominant costs of processing scripts are now download and CPU execution time.

read more

Smashing Magazine Icon Smashing Magazine

A progressive migration to native lazy loading

Native lazy loading is coming to the web. Since it doesn’t depend on JavaScript, it will revolutionize the way we lazy load content today, making it easier for developers to lazy load images and iframes. I’m excited about native lazy loading! We’ve been using lozad.js for lazy loading with some success. There are times when it seems that IntersectionObserver fails to its job and an image won’t load. (If you scroll the element out and back in to the viewport, it will usually work the second time.) But it’s not a feature we can polyfill, and it will take some time before it becomes usable across all browsers. n this article, you’ll learn how it works and how you can progressively replace your JavaScript-driven lazy loading with its native alternative, thanks to hybrid lazy loading. I might try this hybrid approach and see what happens…

read more

CSS Wizardry Icon CSS Wizardry

Self-host your static assets

A revealing look at the costs and risks of linking out to CDN-hosted assets for common libraries. This “best practice” may be anything but, especially with today’s ease of setting up CDNs in front of your own content with tools like Cloudflare. On the practice of linking to 3rd party CDNs, Harry doesn’t hold back: There are a number of perceived benefits to doing this, but my aim later in this article is to either debunk these claims, or show how other costs vastly outweigh them.

read more

Dave Cheney dave.cheney.net

Dave Cheney's "High Performance Go" workshop docs

If you haven’t attended the workshop directly, the next best thing is to learn indirectly by reading the workshop’s docs. The goal for this workshop is to give you the tools you need to diagnose performance problems in your Go applications and fix them. It’s licensed under the Creative Commons Attribution-ShareAlike 4.0 International license and the source is on GitHub.

read more

Damian Gryski github.com

Practices for writing high-performance Go

From writing and optimizing Go code to common gotchas with the Go standard library, Damian Gryski shared his thoughts on Go performance optimization and outlined best practices for writing high-performance Go code. Available in English, 中文, and Español. When and where to optimize — Every optimization has a cost. Generally this cost is expressed in terms of code complexity or cognitive load – optimized code is rarely simpler than the unoptimized version. But there’s another side that I’ll call the economics of optimization. As a programmer, your time is valuable. There’s the opportunity cost of what else you could be working on for your project, which bugs to fix, which features to add. Optimizing things is fun, but it’s not always the right task to choose. Performance is a feature, but so is shipping, and so is correctness.

read more

Sergiy Kukunin habr.com

The pros and cons of Elixir

In this short Q&A, Sergiy Kukunin, an Elixir expert, shares his thoughts on why Elixir is becoming so popular, its core advantages, and its drawbacks. Sergiy also shared this as a takeaway to getting started with Elixir. …the syntax of Elixir has some things in common with Ruby. The languages are entirely different, but it is always good to see symbols and elements you are used to. The simplest thing is to use some of the new Elixir-compatible web-development frameworks. The most popular web framework for Elixir is Phoenix. You should definitely give it a try, especially if you are used to using Ruby on Rails. This will simplify development while still making the app faster and more reliable.

read more

Jeremy Wagner A List Apart

Responsible JavaScript (Part 1)

This pretty much sums up the point Jeremy is trying to get across with this post on A List Apart and the future parts to this story of “Responsible JavaScript.” I’m not here to kill JavaScript — Make no mistake, I have no ill will toward JavaScript. It’s given me a career and—if I’m being honest with myself—a source of enjoyment for over a decade. Like any long-term relationship, I learn more about it the more time I spend with it. It’s a mature, feature-rich language that only gets more capable and elegant with every passing year. Yet, there are times when I feel like JavaScript and I are at odds. I am critical of JavaScript. Or maybe more accurately, I’m critical of how we’ve developed a tendency to view it as a first resort to building for the web…

read more

Victor Zhou victorzhou.com

Why I replaced Disqus and you should too

Victor Zhou: Switching away from Disqus reduced my page weight by over 10x and my network requests by over 6x. Disqus is bloated and sells your data - there are much better alternatives out there. Disqus has been the de facto comment engine used for dev blogging (especially for SSGs) for years. I’m happy to learn there are less bloated and privacy-focused alternatives out there.

read more

Cloudflare Icon Cloudflare

1.1.1.1 + Warp

Cloudflare just launched a VPN for people who don’t know what V.P.N. stands for. …we think the market for VPNs as it’s been imagined to date is severely limited. Imagine trying to convince a non-technical friend that they should install an app that will slow down their Internet and drain their battery so they can be a bit more secure. Good luck. What’s interesting is the patience they’ve demonstrated with this launch. They first had to learn a thing or two about… …the failure conditions when a VPN app switched between cellular and WiFi, when it suffered signal degradation, tried to register with a captive portal, or otherwise ran into the different conditions that mobile phones experience in the field. The basic version of Warp is free. To put folks at ease (cause they’re a for-profit company), they’ve been transparent about their motives and shared “three primary ways this makes financial sense” for them.

read more

 Itamar Turner-Trauring pythonspeed.com

10× faster database tests with Docker

Testing code that talks to the database can be slow. Fakes are fast but unrealistic. What to do? With a little help from Docker, you can write tests that run fast, use the real database, are easy to write and run. I tried Itamar’s technique on changelog.com’s test suite and the 679 tests complete in ~17 seconds. The same tests run directly against Postgres complete in ~12 seconds. A net loss for me, but that may have something to do with how Docker for Mac works? I’d love to hear other people’s experiences.

read more

0:00 / 0:00