← Useful
September 1, 20267 min read
News

Find the bottleneck first: A prioritization model for faster websites

Category: Website performance. A practical method for prioritising measures related to Core Web Vitals, images, caching, code and databases.

A slow website rarely becomes fast simply because someone installs yet another optimization plugin. The problem may be a large hero image, JavaScript blocking the browser, missing caching, or a database taking too long to build the page. If you start with the wrong measures, you risk wasting both time and money without users noticing much difference.

A better approach is to find out where the delay is actually occurring. This allows website performance to be treated as a prioritization exercise rather than a random list of technical improvements.

Core Web Vitals show the symptom, not always the cause

Core Web Vitals consist of three key metrics: Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). LCP measures how quickly the largest visible content element appears. INP measures how quickly the page responds to interactions. CLS measures how much content shifts unexpectedly while the page is being used.

Riktig feilsøking viser hvor ventetiden faktisk oppstår.
Proper troubleshooting shows where the delay is actually occurring.

A good LCP is 2.5 seconds or less, a good INP is 200 milliseconds or less, and a good CLS is 0.1 or lower. The assessment is based on the 75th percentile of real page views. In practice, this means that at least three out of four visits should fall within the good threshold.

These metrics are useful, but on their own they do not tell the developer what to change. A poor LCP, for example, may be caused by a slow server, an image discovered too late, too much render-blocking CSS, or JavaScript occupying the browser’s main thread. The metric should therefore be used as a starting point for troubleshooting, not as a finished diagnosis.

Start by distinguishing between five types of bottlenecks

1. Server and database: The page starts too late

If it takes a long time for the browser to receive the first response, everything else in the loading process starts late. This may be caused by slow hosting, complex application logic, numerous database calls, or integrations the website is waiting for.

On a WordPress site, a single page view can trigger work in the theme, plugins, and database before the HTML document is sent. Persistent object caching can reduce repeated database queries, while page caching can in many cases deliver pre-generated HTML without rebuilding the page for every visit. The WordPress documentation specifically notes that object caching can reduce database trips and improve server response time.

Investigate this area first if many different page types have a slow initial response, including pages with few images and little JavaScript. Look for slow database queries, large amounts of automatically loaded settings, external API calls, and functions that run on every page view.

Bilder bør tilpasses både motiv, visningsstørrelse og plassering.
Images should be adapted to the subject, display size, and placement.

2. Images: The main content takes too long to become visible

Images are often among the heaviest resources on a page, but file size is only part of the problem. The browser must also discover the right image file early and understand what size it needs.

Use responsive images so that a mobile phone does not download the same file as a large screen. Choose a suitable modern image format, compress it to a quality appropriate for the subject, and specify the image’s width and height. Fixed dimensions or a defined aspect ratio allow the browser to reserve space before the image has loaded, reducing layout shifts.

Pay particular attention to the hero image or another image that becomes the page’s LCP element. This image should normally not be lazy-loaded. It should be visible in the HTML source so that the browser can start downloading it early. When an important image is not discovered until after CSS or JavaScript has been loaded and processed, a great deal of valuable time has already been lost.

3. JavaScript and CSS: The page is visible, but responds slowly

A website can look finished and still feel sluggish. The user clicks a menu, filter, or button, but nothing happens immediately. In that case, JavaScript and work on the browser’s main thread are natural areas to investigate.

Large scripts must be downloaded, parsed, and executed. Long tasks can prevent the browser from processing the user’s action and displaying the next visual update. This can result in poor INP, especially on lower-cost mobile phones. Measures may include removing unused code, splitting up large bundles, deferring functions that are not immediately needed, and breaking extensive work into smaller tasks.

Ytelse må testes på enhetene kundene faktisk bruker.
Performance must be tested on the devices customers actually use.

Also review third-party scripts. Chat, analytics, tracking, maps, video, and personalization may each seem modest on their own, but together they can create significant work. Ask whether each service needs to load on every page, or whether it can be activated only when the user actually needs it.

CSS can delay the first display because the browser must understand the styles before it can render the page. Avoid sending large stylesheets containing rules that are not used on the current page. Critical styles should be available early, while less important styles can be loaded later. The goal is not necessarily to have as few files as possible, but to ensure that the right resources arrive in the right order.

4. Layout: The content shifts during loading

A page feels unstable when text, buttons, and forms move as images, fonts, or external elements load. This is more than a visual annoyance. The user may end up clicking the wrong button.

Therefore, reserve space for images, videos, information boxes, ads, and embedded solutions. Avoid inserting banners above content that has already been displayed. Also test how web fonts affect text size and line wrapping. Images and embedded elements without known dimensions are among the most common causes of poor CLS.

5. Caching: The same work is repeated unnecessarily

Caching can take place in the browser, in a CDN, on the web server, in the application, and in front of the database. The purpose is the same: to avoid retrieving or calculating the same content again when it has not changed.

Versioned CSS and JavaScript files can usually have a long lifetime in the browser cache. When the filename or URL changes with a new release, the browser can fetch the new version without mixing old and new code. HTML and personalized content require more careful rules. Incorrect caching could otherwise display outdated or user-specific content to the wrong person.

Use a consistent troubleshooting sequence

  1. Choose representative pages. Test the homepage, a standard content page, a landing page, and any product, search, or form pages. One good test of the homepage says little about the rest of the website.
  2. Compare first and repeat visits. If repeat visits are much faster, caching and resource delivery should be investigated. If both are slow, the problem may lie in server processing, code, or large resources.
  3. Find which element or action is slow. Do not stop at a poor LCP or INP. Identify the specific LCP element or interaction causing the delay.
  4. Test on mobile and less powerful hardware. A fast office PC and business-grade connection can easily hide problems that become obvious on a mobile phone with limited capacity.
  5. Change one main factor at a time. This makes it possible to see whether the measure actually worked and reduces the risk of introducing new errors.

Prioritize based on the user’s waiting time

Start with what affects the most users and the most important pages. If the server takes a long time to deliver all pages, this should normally be fixed before fine-tuning an icon. If only one campaign page has poor LCP because of a large hero image, address the image directly.

A practical priority is to fix broad server and caching problems first, then improve the most important content in the first viewport, and finally work on interactions, third-party scripts, and smaller resource savings. The exception is serious stability problems or buttons that do not respond. Such issues affect actual use and should be handled quickly.

Include perceived speed in the assessment

Technical measurements are necessary, but users judge whether the website provides clear progress. A button should indicate that the action has been registered. A search or filter should provide a rapid visual response. The content at the top of the page should be useful, not merely a large decorative area.

At the same time, avoid masking sluggishness with unnecessary loading animations. The best solution is usually to reduce the amount of work. When something genuinely needs time, the interface should explain what is happening and prevent repeated clicks.

Make performance a requirement, not a cleanup task

Websites gradually become heavier as new fonts, tracking tools, modules and integrations are added. Therefore, define a simple performance budget: how large images may be, which third-party services are allowed, and which page templates must be checked before publication.

Track progress over time using both lab tests and data from real users. Lab testing makes it easier to reproduce and troubleshoot a problem. Field data shows how the website actually performs across different devices, networks and visiting situations.

Ultimately, good website performance is about removing the delays users notice. When you connect Core Web Vitals to the right technical layer, it becomes easier to choose measures that deliver a visible improvement—instead of just a longer list of installed optimizations.