Monthly Shaarli

All links of one month in a single page.

August, 2020

"Accelerating Javascript (in the browser)", Jonathan Dinu (@hyphaebeast)

The techniques at your disposal can be (roughly) grouped into the following types of optimizations:

  • Parallel execution (with web workers usually)
  • GPU acceleration
  • Efficient Arrays and linear algebra routines
  • Source compilation + optimization (asm.js, WebAssembly)

And each of these is suited particularly well to overcome a specific performance bottleneck (or use case).

"radEventListener: a Tale of Client-side Framework Performance", Jeremy Wagner (@malchata)
thumbnail

This is not a React hit piece, but rather a plea for consideration of how we do our work. Some of these performance pitfalls can be avoided if we take care to evaluate what tools make sense for the job, even for apps with a great deal of complex interactivity.
[…] if you use React or any VDOM library, you should spend some time investigating its impact on an array of devices. Get a cheap Android device and see how your app feels to use. Contrast that experience with your high-end devices.

"How to Use AVIF: The New Next-Gen Image Compression Format", Dan Klammer (@danklammer)
thumbnail

… ~50% savings compared to JPEG, and ~20% savings compared to WebP.
… can be lossy or lossless, has the ability to use an alpha channel (transparency for UI and design elements), and even has the ability to store a series of animated frames (think lightweight high-quality animated GIFs).
… one of the first image formats to support HDR color support; offering higher brightness, color bit depth, and color gamuts.

"`content-visibility`: the new CSS property that boosts your rendering performance", Una Kravetz (@una), Vladimir Levin

content-visibility enables the user agent to skip an element's rendering work, including layout and painting, until it is needed. Because rendering is skipped, if a large portion of your content is off-screen, leveraging the content-visibility property makes the initial user load much faster. It also allows for faster interactions with the on-screen content.

"Browser Back/Forward Caches and their Benefit to Web Performance", Paul Calvano (@paulcalvano)

The implementations of Back/Forward caches in popular browsers are helping to improve this experience even further - which has the benefit of significantly speeding up the web for up to 20% of navigations!

"Performance vs. Functionality: Making the Right Site Speed Tradeoffs", Nick Winkler (for @ShopifyPlus)
thumbnail

Fortunes are made and lost based on how brands thread the needle between site speed and functionality. Despite this, the Retail Systems Research (RSR)’s survey reveals the average retailer’s website is still too slow, and their mobile sites are even slower.

Even worse, many have no idea how they stack up.

"Why you should be testing your 404 pages web performance", Matt Hobbs (@therealnooshu)

Assuming that an optimised 404 page is only required because users will mistype a URL in their browser is short-sighted. As the HTTP Archive data has shown, there are many other reasons why a user may encounter a 404 response (even if they have no idea they actually are!). The web performance impact of a users browser loading an unoptimised 404 page can be huge, and it can have a real impact on their experience of your whole site. All it takes is a forgotten file or misplaced ; in some JavaScript, and your users could be encountering it.

"How Fast Should Your Load?", David East (@_davideast)
thumbnail

Now that you know these metrics, we can use them to understand what’s happening on our sites and to ask better questions.

"Ne nommez pas vos outils", Pablo Pernot (@pablopernot)

Leur donner un nom c’est donner une importance à ce qui ne l’est pas. Le nom n’est pas important. Ce que l’on en fait l’est.

Concrete Javascript Regex for Accented Characters (Diacritics)
thumbnail
[A-zÀ-ú] // accepts lowercase and uppercase characters
[A-zÀ-ÿ] // as above but including letters with an umlaut (includes [ ] ^ \ × ÷)
[A-Za-zÀ-ÿ] // as above but not including [ ] ^ \
[A-Za-zÀ-ÖØ-öø-ÿ] // as above but not including [ ] ^ \ × ÷