tammy, to UX
@tammy@webperf.social avatar

The next edition of Speed Matters is dedicated to INP: what it is, how to track it, how to validate it against your business/UX metrics, and – most important – how to improve it.

Coming to your inbox next week! Join our 13K+ subscribers: https://www.speedcurve.com/newsletter/

monospace, to SEO
@monospace@floss.social avatar

You don't need a CDN! With Varnish, the open source cache proxy, you can shield your website from traffic spikes and speed up its content delivery by orders of magnitude. In my Varnish Master Course, you'll learn everything you need to set it up and configure it for optimal performance. https://www.monospacementor.com/courses/varnish-master-course/

piefedadmin, to fediverse
@piefedadmin@join.piefed.social avatar

For a very small instance with only a couple of concurrent users a CDN might not make much difference. But if you take a look at your web server logs you’ll quickly notice that every post / like / vote triggers a storm of requests from other instances to yours, looking up lots of different things. It’s easy to imagine how quickly this would overwhelm an instance once it gets even a little busy.

One of the first web performance tools people reach for is to use a CDN, like Cloudflare. But how much difference will it make? In this video I show you my web server logs before and after and compare them.

The short answer is – before CDN: 720 requests. After CDN: 100 requests.

Usually just turning on a CDN with default settings will not help very much, you’ll need to configure some caching rules or settings. By watching your server logs for a while you’ll get a sense for what needs to be cached but check out mine for a starting point:

https://join.piefed.social/wp-content/uploads/2024/02/caching_activity1-1024x577.pngAll these are frequently requested on my instance. Depending on the fediverse platform you have installed, you’ll probably see different patterns and so need different caching settings.

Beware of caching by URI Path because often fediverse software will return different data depending on the Accept header that the requester sets. For example, on PieFed and Lemmy instances a request by a web browser to /post/123 will return HTML to show the post to someone. But when that same URL is requested with the Accept: application/ld+json header set, the response will be an ActivityPub representation of the post! You don’t want people getting activitypub data in their browser and you don’t want to be serving HTML to other instances. Once you spot a URL you want to cache, use a tool like Postman to set the Accept header and make a fake ActivityPub request to your instance and see if you get back HTML or JSON.

Another problem that can happen is that often a response will vary depending on whether the viewer is logged in, or who is logged in. If you can figure out how to configure the CDN to pay attention to cookies or whatever headers are used for Authentication by your platform then you might be able to cache things like /post/*… I couldn’t.

The things I’ve chosen to cache by URI Path above are ones that I know don’t vary by HTTP header or by authentication.

Although we can’t use URI Path a lot of the time, we can cache ActivityPub requests by detecting the Accept: allocation/ld+json header:

https://join.piefed.social/wp-content/uploads/2024/02/caching_activity2-1024x811.pngThis will cache all ActivityPub requests, regardless of URL. People browsing the same URLs as those used by ActivityPub will be unaffected as their requests won’t have the special HTTP header. I used a short TTL to avoid serving stale data when someone quickly edits a post straight after creating it.

There seems to be a deep vein of optimization here which I’ve only just started to dig into. These changes have made a huge difference already and for now my instance is under very little load so I’ll leave it there for now…

https://join.piefed.social/2024/02/20/how-much-difference-does-a-cdn-make-to-a-fediverse-instance/

piefedadmin, to kbin
@piefedadmin@join.piefed.social avatar

Google provides a tool called PageSpeed Insights which gives a website some metrics to assess how well it is put together and how fast it loads. There are a lot of technical details but in general green scores are good, orange not great and red is bad.

I tried to ensure the tests were similar for each platform by choosing a page that shows a list of posts, like https://mastodon.social/explore.

https://join.piefed.social/?attachment_id=308Mastodonhttps://join.piefed.social/?attachment_id=307Peertubehttps://join.piefed.social/?attachment_id=311Misskeyhttps://join.piefed.social/?attachment_id=309Lemmyhttps://join.piefed.social/?attachment_id=313kbinhttps://join.piefed.social/?attachment_id=315Akkomahttps://join.piefed.social/?attachment_id=310PieFedhttps://join.piefed.social/?attachment_id=314pixelfedhttps://join.piefed.social/?attachment_id=312PleromaPieFed and kbin do very well. pixelfed is pretty good, especially considering the image-heavy nature of the content.

The rest don’t seem to have prioritized performance or chose a software architecture that cannot be made to perform well on these metrics. It will be very interesting to see how that affects the cost of running large instances and the longevity of the platforms. Time will tell.

https://join.piefed.social/2024/02/13/technical-performance-of-each-fediverse-platform/

tammy, to random
@tammy@webperf.social avatar

Slow backend times can hurt important front-end metrics like Start Render and Largest Contentful Paint. If you're using Akamai, Amazon Cloudfront, Cloudflare, Fastly, or Shopify, this post is a must-read. Among other things, @cliff provides clear examples of how you can use server-timing headers to get more visibility into your CDN.

https://www.speedcurve.com/blog/server-timing-time-to-first-byte/

piefedadmin, (edited ) to random
@piefedadmin@join.piefed.social avatar

Us sitting here with our fiber internet and recent model phones have it pretty good. But the “i” in iPhone stands for “inequality”. Most people in the world still have pretty bad internet and old/slow phones. For a platform to be widely adopted and to serve the needs of those who often miss out, it needs to be frugal in network and cpu usage.

Lemmy Kbin PieFed
Home page 4.5 MB 1.65 MB 700 KB – 930 KB
Viewing a post 360 KB 826 KB (varies) 29 KB

Home pages

Due to Lemmy’s javascript-heavy software architecture, visiting a Lemmy home page involves downloading . And this only gets you 20 posts! Also community thumbnails, even if displayed as a 22px by 22px icon are served directly from their home instances, unresized, which can often be multiple megabytes in size. The home page of lemmy.nz is currently weighing over 9 MB.

Kbin’s home page comes in at a respectable 1.65 MB due to relying less on JavaScript. However it is let down by not using loading=”lazy” on images so they all need to be loaded immediately and by generating post thumbnails that are twice as big as they need to be.

The PieFed home page, showing 5x more posts than Lemmy, weighs between 700 and 930 KB, depending on which posts are shown. In low bandwidth mode, the home page is only 220 KB due to not having any thumbnails.

Viewing posts

When viewing a post, we can assume various assets (CSS, JS and some images) are cached due to loading the home page first.

The picture looks similar when viewing a post, which is a bit surprising. One of the usual benefits of the JS-heavy SPA architecture used by Lemmy is that once all the ‘app’ is loaded into the browser, subsequent pages only involve a small API call. However, going to a page in Lemmy involves two API calls (one for the page and one for the comments) both of which return quite a bit of data. If you look at the ‘get the comments on this post’ JSON response you can see the developers have fallen into the classic SPA pitfall of “over-fetching“. They’re retrieving a whole haystack from the backend and then using JavaScript to find the needle they want, which involves transferring the haystack over the internet. Ideally the backend would find the needle and just send that to the frontend.

Kbin sends more data than it needs to when viewing a post, again because of not using loading=”lazy” which causes every profile picture of the commenters to be loaded at once. Making this simple fix would bring the weight down, from ~800 KB to around 50 KB.

PieFed only sends 10 KB – 30 KB to show a post, but it varies depending on the number and length of comments. This could be reduced even more by minifying the HTML response but with PieFed under active development I prefer the source to be as readable as possible to aid in debugging.

This is no accident. It is the result of choices made very early on in the development process, well before any code was written. These choices were made based on certain priorities and values which will continue to shape PieFed in the future as it grows. In a world where digital access remains unequal, prioritizing accessible and fast-loading websites isn’t just about technology; it’s a step towards a more inclusive and equitable society.

https://join.piefed.social/2024/02/09/comparing-network-utilization-of-lemmy-kbin-and-piefed/

speedcurve, to UX
@speedcurve@webperf.social avatar

"If you don't consider time a crucial usability factor, you're missing a fundamental aspect of the user experience." This insightful post from @tammy covers topics like:

⚡ How fast we need pages to be
⚡ How delays hurt productivity
⚡ Measuring "web stress"
⚡ How slowness affects your brand

https://www.speedcurve.com/blog/psychology-site-speed/

tammy, to UX
@tammy@webperf.social avatar

More important INP insights from @cliff, including:

🔵 Only 2/3 mobile sites have "good" INP
🟢 Mobile INP = Android INP
🟡 Mobile INP has an even stronger correlation with bounce rate and conversions than desktop INP

https://www.speedcurve.com/blog/core-web-vitals-inp-mobile/

tammy, to UX
@tammy@webperf.social avatar

Interaction to Next Paint replaces FID as the responsiveness metric in on March 12. It's a good time to revisit important INP research, starting with @cliff's investigation into whether INP correlates to user behaviour. (TLDR: It does, but with some interesting caveats.)

https://www.speedcurve.com/blog/INP-user-experience-correlation/

tammy, to UX
@tammy@webperf.social avatar

Ever wonder why you get cranky when sites are slow? This post is for you! Findings include:

🤔 We perceive load times as 15% slower than they really are
🧠 Your brain works 50% harder when pages are slow
⏱️ 100ms is the ideal rendering time

https://www.speedcurve.com/blog/psychology-site-speed/

tammy, to UX
@tammy@webperf.social avatar

The topic that sparked my passion for 14 years ago: the science behind why we crave fast – and why we get cranky when sites are slow! This post covers:

⏱️ How we perceive wait times
👩‍💼 How delays hurt productivity
🤯 Measuring "web stress"
➕ Much more!

https://www.speedcurve.com/blog/psychology-site-speed/

calibre, to random
@calibre@webperf.social avatar

📬 Performance Newsletter №144:

🔹 Measuring soft navigation experiment by @tunetheweb & @Yoav
🔹 LCP & FCP on single page application on soft navigations @dwsmart
🔹INP meets Puppeteer by Tsvetan Stoychev

and more!

https://mailchi.mp/perf.email/144

speedcurve, to UX
@speedcurve@webperf.social avatar

Performance budgets are your best tool for fighting page speed regressions. This guide covers how to:

✅ Differentiate between budgets and goals
✅ Track the right metrics
✅ Determine thresholds
✅ Integrate with your CI/CD process
✅ Get stakeholder buy-in

https://www.speedcurve.com/blog/performance-budgets/

dwsmart, to random
@dwsmart@seocommunity.social avatar

Collecting Core Web Vitals for SPAs is getting closer. I have done a quick write up of looking at the new soft navigations on my site

https://tamethebots.com/blog-n-bits/lcp-fcp-soft-navigations

tammy, to random
@tammy@webperf.social avatar

I've been wishing I could work with @tkadlec pretty much since the day I met him more than ten years ago. Sometimes wishes come true, folks!

https://www.speedcurve.com/blog/building-future-performance/

speedcurve, to UX
@speedcurve@webperf.social avatar

2023 was all about making easier:

🟡 Fight regressions & stay fast
🟡 Measure the impact of on
🟡 See correlations between speed and business metrics
🟡 Leverage synthetic & real user monitoring
🟡 Get help when you need it

https://www.speedcurve.com/blog/2023-easy-web-performance/

gunnarsson, to 11ty
@gunnarsson@mastodon.social avatar

This morning I finished another post on my tiny blog, this time about how I set up automatic image pre-processing in @eleventy to maintain a perfect Lighthouse score while allowing myself to be lazy about images: https://www.martingunnarsson.com/posts/eleventy-automatic-image-pre-processing/

tammy, to UX
@tammy@webperf.social avatar

This year our key word at @speedcurve was "easy". Our 2023 highlights all centre around making it easier for you to create impact – from fighting regressions to building culture. Here's a recap. And here's to more great things in 2024.

https://www.speedcurve.com/blog/2023-easy-web-performance/

speedcurve, to UX
@speedcurve@webperf.social avatar

In his latest post, @Joseph_Wynn shows how you can use our new @github integration to get feedback for your code changes directly in the environment you are working in – so you can fight regressions and keep your pages fast!

https://www.speedcurve.com/blog/web-performance-test-pull-requests/

stvfrnzl, to random
@stvfrnzl@mastodon.online avatar

"[...] web performance isn’t just a tech problem to solve, it’s a social issue. Our societies require people to use websites, yet we serve 10MB poorly-optimised JavaScript-heavy ‘apps’ via metered connections to a $30 smartphone—that’s never going to work!"

https://www.htmhell.dev/adventcalendar/2023/14/

Interested in ? Check out this article by @accudio covering everything you need to know with great examples and easy to understand.💡

tammy, to UX
@tammy@webperf.social avatar

My kids and I love LEGO, so I spend a lot of time on the LEGO site during the holidays. So I thought it would be fun to give the site a quick audit. Here's what I learned, along with some lessons you may want to apply to your own pages.

https://www.speedcurve.com/blog/web-performance-audit-lego/

speedcurve, to UX
@speedcurve@webperf.social avatar

CI/CD workflow improvements, more powerful RUM, and more! Here's what we shipped this month.

https://www.speedcurve.com/blog/december-2023-update/

speedcurve, to UX
@speedcurve@webperf.social avatar

We now offer great consulting to go with our great tools! Our amazing team of and experts will help you make your site faster, your users happier, and your business more successful.

Find the right consulting package for you: https://www.speedcurve.com/features/consulting/

speedcurve, to UX
@speedcurve@webperf.social avatar

As @cliff explains in this post, only 65% of mobile sites have "good" Interaction to Next Paint. Why? How much can this hurt your business? And how can you fix it before INP dethrones FID as the responsiveness metric in in March?

https://www.speedcurve.com/blog/core-web-vitals-inp-mobile/

speedcurve, to UX
@speedcurve@webperf.social avatar

Now that INP has arrived to dethrone FID as the responsiveness metric, it's time to scrutinize its effectiveness. @cliff looks at real-world data and asks: What correlation does INP have with and business metrics?

https://www.speedcurve.com/blog/INP-user-experience-correlation/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • Durango
  • JUstTest
  • InstantRegret
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ethstaker
  • osvaldo12
  • modclub
  • normalnudes
  • provamag3
  • tester
  • anitta
  • Leos
  • lostlight
  • All magazines