<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Kuboi</title>
    <description>The latest articles on DEV Community by Daniel Kuboi (@dan9el8).</description>
    <link>https://dev.to/dan9el8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3962565%2F07d48195-5b3d-4404-8df9-805d2c20fe5a.jpeg</url>
      <title>DEV Community: Daniel Kuboi</title>
      <link>https://dev.to/dan9el8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dan9el8"/>
    <language>en</language>
    <item>
      <title>Speed is also a Feature</title>
      <dc:creator>Daniel Kuboi</dc:creator>
      <pubDate>Mon, 01 Jun 2026 12:11:52 +0000</pubDate>
      <link>https://dev.to/dan9el8/speed-is-also-a-feature-1jh9</link>
      <guid>https://dev.to/dan9el8/speed-is-also-a-feature-1jh9</guid>
      <description>&lt;p&gt;Modern web applications are more powerful than ever. Frameworks keep evolving, AI can generate code in seconds, and developers can ship features faster than at any other point in history. Yet despite all this progress, many applications still feel frustratingly slow. We've all experienced it. You click a link and stare at a blank screen. You press a button and wonder whether it actually worked. You try to scroll, but the page stutters and freezes. At that moment, users aren't thinking about your architecture, design patterns, or technology stack. They're thinking about one thing:&lt;/p&gt;

&lt;p&gt;"Why is this so slow?"&lt;br&gt;
That's why performance isn't just a technical concern. It's a product feature.&lt;/p&gt;

&lt;p&gt;Users may never notice a well-designed database schema or a carefully structured codebase, but they immediately notice when an application feels fast. Speed creates confidence. It makes software feel reliable, polished, and trustworthy.&lt;/p&gt;

&lt;p&gt;In many cases, speed is the very first feature users experience.&lt;/p&gt;

&lt;p&gt;This article explores web performance from the user's perspective. We'll look at how people perceive speed, learn how modern performance metrics measure real-world experiences, understand the RAIL model, and discuss practical techniques for building applications that feel fast on every device and network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Performance Matters&lt;/strong&gt;&lt;br&gt;
Performance is often discussed as a technical metric, but at its core, it's about people.&lt;/p&gt;

&lt;p&gt;When users visit your application, they're trying to accomplish something. Maybe they're shopping online, reading an article, sending a message, or managing their finances. They don't care how many microservices are running behind the scenes. They care about completing their task quickly and without frustration.&lt;/p&gt;

&lt;p&gt;Research has consistently shown that delays have a direct impact on user behavior. The longer people wait, the more likely they are to leave.&lt;/p&gt;

&lt;p&gt;Human perception generally follows these patterns:&lt;/p&gt;

&lt;p&gt;0–100 ms                 Feels instant                                               Around 1 second          Delay is noticeable but doesn't interrupt&lt;br&gt;&lt;br&gt;
2–5 seconds              Patience starts to wear thin&lt;br&gt;&lt;br&gt;
5–10 seconds             Users begin questioning &lt;br&gt;
More than 10 seconds     Many users abandon the task altogether                     &lt;/p&gt;

&lt;p&gt;Think about your own browsing habits. If an online store takes ten seconds to load a product page, chances are you'll open another tab and look elsewhere. Users don't compare your application against technical benchmarks. They compare it against their expectations. And expectations keep getting higher.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Through the User's Eyes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the biggest mistakes developers make is measuring performance differently from how users experience it.&lt;/p&gt;

&lt;p&gt;Imagine a page that displays content after two seconds but remains unresponsive until ten seconds because JavaScript is still executing in the background.&lt;/p&gt;

&lt;p&gt;From an engineering perspective, the page loaded.&lt;/p&gt;

&lt;p&gt;From the user's perspective, it's broken.&lt;/p&gt;

&lt;p&gt;This is why modern web performance focuses on user experience rather than purely technical measurements.&lt;/p&gt;

&lt;p&gt;When I evaluate a website's performance, I typically ask four simple questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is something happening?&lt;/li&gt;
&lt;li&gt;Is the content useful?&lt;/li&gt;
&lt;li&gt;Can I interact with it?&lt;/li&gt;
&lt;li&gt;Does everything feel smooth?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These questions map closely to the way users naturally experience a page as it loads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Is Something Happening?&lt;/strong&gt;&lt;br&gt;
The first thing users want is reassurance. Nobody likes staring at a blank screen. As soon as someone visits a page, they want evidence that the application is working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time to First Byte (TTFB)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;TTFB measures how long it takes for the browser to receive the first response from the server.&lt;/p&gt;

&lt;p&gt;A slow TTFB often points to backend issues such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Expensive database queries&lt;/li&gt;
&lt;li&gt;Poor caching strategies&lt;/li&gt;
&lt;li&gt;Slow APIs&lt;/li&gt;
&lt;li&gt;Network latency
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/products"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;getProducts&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;productRepository&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findAll&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This looks harmless, but if it triggers multiple database joins or returns thousands of records, response times can increase dramatically. Often, improving performance isn't about adding more servers. It's about removing unnecessary work.&lt;br&gt;
First Paint measures the moment something appears on the screen.&lt;/p&gt;

&lt;p&gt;Even if it's just a loading skeleton or navigation bar, users gain confidence because they can see progress. A blank page creates uncertainty. Visible feedback creates trust.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Is It Useful?&lt;/strong&gt;&lt;br&gt;
Showing something quickly is good. Showing meaningful content quickly is better. Users don't visit a website to admire loading indicators. They come for content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First Contentful Paint (FCP)&lt;/strong&gt;&lt;br&gt;
FCP measures when meaningful content first appears.&lt;br&gt;
This could be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Text&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Icons&lt;/li&gt;
&lt;li&gt;Headlines&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point, users can begin consuming information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Largest Contentful Paint (LCP)&lt;/strong&gt;&lt;br&gt;
LCP measures when the largest visible element appears on screen.In many applications, that's the content users care about most.&lt;br&gt;
Examples include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A hero image&lt;/li&gt;
&lt;li&gt;A product photo&lt;/li&gt;
&lt;li&gt;A blog article&lt;/li&gt;
&lt;li&gt;A dashboard summary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Google recommends keeping LCP under 2.5 seconds.&lt;br&gt;
A common mistake is loading oversized images:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"huge-image.jpg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A better approach is to compress assets and use modern formats:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt;
    &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"hero.webp"&lt;/span&gt;
    &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"1200"&lt;/span&gt;
    &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"600"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Is It Usable?&lt;/strong&gt;&lt;br&gt;
Many modern websites look loaded long before they're actually usable.The page appears complete, but clicks don't work.&lt;/p&gt;

&lt;p&gt;Buttons feel delayed.&lt;br&gt;
Scrolling becomes sluggish.&lt;/p&gt;

&lt;p&gt;This often happens because JavaScript is still busy executing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time to Interactive (TTI)&lt;/strong&gt;&lt;br&gt;
TTI measures when users can reliably interact with the page. A fast-loading page that doesn't respond is still a poor experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interaction to Next Paint (INP)&lt;/strong&gt;&lt;br&gt;
INP focuses on responsiveness.&lt;br&gt;
It measures how quickly the browser reacts after a user interaction.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clicking a button&lt;/li&gt;
&lt;li&gt;Opening a menu&lt;/li&gt;
&lt;li&gt;Submitting a form&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When interactions feel delayed, users notice immediately.&lt;br&gt;
Consider this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;performMassiveCalculation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that calculation blocks the main thread for several seconds, the application feels frozen.&lt;br&gt;
A better option could be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;showLoadingIndicator&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;performMassiveCalculation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Does It Feel Smooth?&lt;/strong&gt;&lt;br&gt;
Performance doesn't end once a page loads. Users continue judging your application during scrolling, navigation, and animations.&lt;br&gt;
Small annoyances accumulate quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cumulative Layout Shift (CLS)&lt;/strong&gt;&lt;br&gt;
Have you ever tried clicking a button only for the page to suddenly move? That's layout shift.&lt;/p&gt;

&lt;p&gt;It's one of the most frustrating performance problems because it interrupts user actions.&lt;/p&gt;

&lt;p&gt;A common cause is images loading without reserved dimensions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"banner.jpg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A better approach is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt;
    &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"banner.jpg"&lt;/span&gt;
    &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"1200"&lt;/span&gt;
    &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"400"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Frame Rate&lt;/strong&gt;&lt;br&gt;
Smooth interfaces generally run at 60 frames per second. That means the browser has roughly 16 milliseconds to render each frame.&lt;/p&gt;

&lt;p&gt;Whenever rendering exceeds that budget, users experience:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stuttering animations&lt;/li&gt;
&lt;li&gt;Choppy scrolling&lt;/li&gt;
&lt;li&gt;Laggy interactions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The RAIL Model&lt;/strong&gt;&lt;br&gt;
Google introduced the RAIL model as a way to think about performance from a human perspective rather than a technical one.&lt;br&gt;
RAIL stands for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Response&lt;/li&gt;
&lt;li&gt;Animation&lt;/li&gt;
&lt;li&gt;Idle&lt;/li&gt;
&lt;li&gt;Load&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each category represents a different part of the user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Response&lt;/strong&gt;&lt;br&gt;
Users expect feedback almost instantly. If someone clicks a button, they shouldn't wonder whether the click was registered.&lt;/p&gt;

&lt;p&gt;A simple loading state often improves perceived performance significantly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;submitButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;showSpinner&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;submitForm&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even when the request takes several seconds, users feel more comfortable because the application is communicating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Animation&lt;/strong&gt;&lt;br&gt;
Smooth animations make interfaces feel alive. Poor animations make them feel broken. Whenever possible, animations should remain close to 60 FPS.&lt;/p&gt;

&lt;p&gt;For example, avoid expensive calculations during scroll events:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scroll&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;expensiveCalculation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead, allow the browser to optimize rendering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scroll&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;requestAnimationFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;updateUI&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Idle&lt;/strong&gt;&lt;br&gt;
Every application has moments when users aren't interacting. These moments are opportunities. Background tasks such as preloading data or caching assets can be performed during idle periods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;requestIdleCallback&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;preloadNextPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Load&lt;/strong&gt;&lt;br&gt;
Performance isn't about loading every resource immediately. It's about loading the right resources first.&lt;br&gt;
Techniques such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Code splitting&lt;/li&gt;
&lt;li&gt;Lazy loading&lt;/li&gt;
&lt;li&gt;Server-side rendering&lt;/li&gt;
&lt;li&gt;Asset compression&lt;/li&gt;
&lt;li&gt;CDN caching&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;help prioritize what users actually need.&lt;/p&gt;

&lt;p&gt;In conclusion Users don't experience your codebase. They experience its speed. They don't see your microservices, design patterns, cloud infrastructure, or database indexes. They see how quickly content appears, how responsive interactions feel, and whether the application helps them accomplish their goals without friction.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
