Website speed optimisation: how to identify and fix performance bottlenecks

We explain how to measure website performance, distinguish server, image and application issues, implement focused improvements and verify actual results.

Website speed optimisation: how to identify and fix performance bottlenecks

Performance is not one number

Website speed optimisation begins with the user's experience. Is the visitor waiting for content to appear, experiencing a delay after an interaction, or seeing elements move unexpectedly while reading? These are different problems with potentially different causes. A server may respond quickly while the page loads oversized images or processes substantial JavaScript. A lightweight interface can still wait for a slow database query. We identify symptoms, measure them and test improvements before accepting changes.

Metrics we use

The Web Vitals initiative defines three principal page-experience metrics. LCP measures the appearance of the largest eligible visible content element; INP assesses interaction responsiveness; CLS measures unexpected layout shifts. Current good thresholds are LCP at 2.5 seconds or less, INP at 200 milliseconds or less, and CLS at 0.1 or less, assessed at the 75th percentile when sufficient field data exists. These values are not commercial guarantees, and favourable metrics do not prove every business function works correctly.

We review real-user information from Chrome UX Report or suitable measurement tools where available, and use controlled tools such as Lighthouse and DevTools to investigate causes. A single laboratory run under specific network conditions does not represent every visitor. Sample product, service, homepage and interactive templates, and use comparable test conditions before and after changes.

Where diagnosis begins

  • Server response: inspect response timing and the work preceding it, including database access and external APIs.

  • Images and fonts: examine transfer sizes, formats, display dimensions and eager or deferred loading decisions.

  • JavaScript: review long tasks, bundle sizes, work preceding interactions and third-party script impact.

  • Layout: investigate images, advertisements or components that do not reserve space before appearing.

  • Caching: identify safely reusable resources while separating public responses from account and private transaction data.

These areas help isolate bottlenecks. Do not purchase additional infrastructure before establishing whether CPU, memory or the database is limiting performance. Our hosting guide explains the distinction between infrastructure constraints and application issues.

Improve image delivery and loading

If a large hero image is displayed at small mobile dimensions, prepare a more appropriate representation and format while preserving meaningful visual quality. Use responsive images where supported and reserve dimensions to reduce layout movement. Do not indiscriminately defer a primary visible image without assessing the effect, while below-the-fold images may be appropriate for deferred loading. Do not compress product images until important purchase information becomes unreadable.

For illustration, a page loads five images of 800 kilobytes each, approximately four megabytes in total. If suitable 160-kilobyte representations are possible, the total becomes approximately 800 kilobytes, an 80% reduction in this resource category. That is not an 80% reduction in loading time; network, requests, server work and rendering also matter. Re-measure instead of inferring improvement from file sizes alone.

Improve backend and application performance

Investigate slow queries, appropriate indexing and execution plans, and unnecessary data retrieval. Do not add indexes indiscriminately without considering write and storage costs. Examine repetitive external requests and use caching when the type of information permits it. Account, order and personalised pricing responses require controls preventing inappropriate sharing between users.

On the client, inspect JavaScript size, component boundaries and unnecessary scripts. If an interaction is delayed by a long task, investigate browser work triggered by that interaction rather than focusing solely on image compression. If fonts or images cause layout shifts, reserve dimensions and assess loading behaviour. Preserve payment, booking and form functionality; do not remove a script with a legitimate purpose without checking dependencies.

Verify improvements

Measure representative pages before changes and record values, conditions and dates. Implement a focused improvement or a related group, then repeat measurements under comparable conditions. Check layout, functionality and links, and monitor real-user data over time. If laboratory results improve while errors increase or completed orders decrease, investigate the change. Performance supports the customer experience and must not be pursued independently of operational correctness.

Our technical diagnosis service is listed at SAR 500 for its defined scope, with focused website repairs available separately. We do not promise a specific PageSpeed score before assessment; improvement cost depends on causes and the required changes. Our technical SEO guide explains performance within a broader audit.

Trace delays through the request sequence

For a slow page, examine the loading order of the document, fonts, images, scripts and data requests. If the initial server response is delayed, investigate slow database queries or blocking external requests. If HTML arrives quickly but visible content appears late, examine the main image's size and loading priority, stylesheets and rendering-blocking scripts. We identify the component responsible before proposing a hosting change.

On pages listing products or services, check whether the application requests every record while displaying only a small subset. Paginated retrieval may be more appropriate, while retaining accessible links where required. In administration, refreshing a list after every edit can reload unnecessary data. Public website performance and staff workflow performance are distinct concerns; each needs measurements tied to the user's actual activity.

Document comparable performance results

Select representative pages such as the homepage, a service page and an article. Record repeated measurements under comparable conditions and distinguish first visits from repeat visits. After improvements, retest with equivalent devices and connections and confirm images, forms and essential workflows remain functional. Laboratory results do not replace real-user experience data when sufficient samples are available. Connect each improvement to an explicit objective, such as earlier display of primary content or less waiting after form submission, rather than focusing on a single tool score.

Optimise images and fonts without compromising content quality

A homepage may require a large above-the-fold image. Choose dimensions appropriate to actual display and examine file sizes served to different devices. Do not delay the main image through indiscriminate lazy loading if it postpones primary content. Images further down the page may benefit from deferred loading. Reserve element dimensions to avoid unexpected movement of text and controls while content loads. The objective is visual quality and layout stability with less unnecessary transferred data.

Bilingual sites may use separate Arabic and English font files. Review weights actually used and how fonts are delivered, testing text display before font loading completes. Do not remove approved typography or alter identity merely to improve a metric without design review. Slow pages may instead load scripts globally even when a particular function is used only in a limited area. Review these dependencies and reduce unnecessary delivery, testing dependent functions after changes.

Cache appropriately while preserving data correctness

Some public information can be cached to reduce server work, but caching rules for customer accounts and order states differ. Never deliver a cached response belonging to another user or rely on an outdated price where a transaction requires the current amount. Identify cacheable information, freshness periods and invalidation when content changes. On administratively managed websites, check that service or article updates become visible according to the agreed policy. Performance testing without checking correctness can produce faster but inaccurate results.

Connect database performance to user workflows

If order-detail pages are repeatedly slow, examine their required queries before upgrading server resources. The page may execute repeated queries or retrieve unnecessary records. Assess query plans, indexes and required data while considering effects on writes and correctness. Adding an index to every field is not automatically useful; indexes have storage and update costs. After remediation, test dependent requests under different conditions and compare response times with workloads appropriate to the application. Website performance improvements should address identified components rather than introduce arbitrary changes.

Measure responsiveness under representative usage conditions

A site may test well on a fast connection near its server while mobile-network visitors experience delays. Examine representative pages on different devices and connections where possible and establish whether the issue recurs or appears under particular conditions. A local developer-machine measurement and a remote production test are not directly comparable. After changing an image or script, repeat measurement under equivalent conditions to assess the intervention. Review real-user data where available: it may expose issues absent from one laboratory test, such as slow interaction with a menu or form after initial loading.

Improve transaction response times

Content may appear quickly while the user waits after submitting a request. Examine server validation, required queries and external calls blocking transaction completion. Where a long-running action need not complete before an acknowledgement, consider background execution with accurately described status. Do not announce successful payment or request persistence before confirming the required outcome. Distinguish acceptance for processing from completion and identify operations requiring a confirmed result before feedback. An interface displaying an incorrect success message quickly is not an acceptable performance improvement.

Allocate performance investment according to impact

Image optimisation or removing redundant data requests may improve a site without a hosting upgrade. Other applications operate near resource limits under legitimate workload and may need increased capacity or reorganised services. Assess measurements before recommending expenditure and define the improvement scope. If a structural defect requires wider development, distinguish a limited repair from redevelopment. We do not promise identical metrics across devices and networks; measure outcomes under documented conditions and verify functionality after changes. Preserve readable content and important links during optimisation rather than removing information users need merely to accelerate rendering.

Frequently asked questions

Is a PageSpeed score of 100 necessary?

No. Actual user experience, working functions and relevant measurements matter more than a perfect laboratory score. Do not remove necessary functionality to improve a test number.

Will upgrading hosting solve a slow site?

It may help when infrastructure is the bottleneck, but does not automatically fix oversized images, client code or inefficient queries.

Does better performance guarantee Google rankings?

No. Performance is one aspect of page experience among multiple factors. No performance score guarantees a particular search position.

Confirming the service scope before ordering

When you request Software Project Diagnosis, we review the published scope with you. Included items are: Investigate a specified issue; Review related code, logs and settings; Identify cause, solution and cost. Items you should not assume are included: Implementation of repairs; Comprehensive security audit. We specify additional work in the quotation before implementation and agree acceptance against the defined deliverables rather than a general service description.

Our related services: Existing Website Repair & Changes, Managed Business Website Hosting.

Official references

Related articles