Elevating nopCommerce Performance: A Comprehensive Proof of Concept Study by nopStation

Wednesday, January 24, 2024

Posted By Admin

In the dynamic world of eCommerce, the key to success lies in an impeccably performing website. nopStation takes pride in offering a holistic approach to enhance the performance of nopCommerce stores. Let's delve into the array of techniques deployed to optimize the online shopping experience.

An e-Commerce Business from Europe: A Real-world Performance Optimization Journey

Disclaimer: We can not expose the client's name due to the NDA terms with them

Performance Issue Reported by Client:

  • Slow loading speed of site pages: A single page load takes 3 to 15 seconds in a regular scenario and 10 to 30+ seconds in extreme cases.
  • Time-Out Errors: The site frequently shows time-out errors from the database while customers browse the category pages and when the site has only 60+ customers online.
  • Spikes in Database Performance Graph: A lot of spikes in the Database performance graph are seen, even on a very limited number of visitors on the site.
  • Suspicious Guest Customers: A huge number of guest customers gets created even on a single crawler visit.
  • Slower Load speed on Mobile devices: Some pages on mobile devices take more than 20s to load.

Our Findings:

  • Codebase Review: We have reviewed their code base, especially those areas where Database requests got time out.
  • Complex Implementation of Business Logic: We have found that they have implemented one of the business logics in a very complex way, which led to too many requests to the Database, also in one method they were retrieving whole products in memory to do filtering on price.
    Image 1.1: Database Performance Starting Point Of CPU Spikes
  • Too many DB Calls for Simple Category Page Load: We have analysed and found they make a large number of Database requests to load one simple category page.
    Image 1.2: Database Performance Performance Graph Compared With Other Sites
  • Lack of Cache Implementation: We have found that they did not implement proper caching techniques to reduce the number of requests to the Database.
  • PageSpeed Insights Findings: We found that they have unnecessary loading of JS files and large content like images is being served from the application server. They have a dependency on 3rd party JS and CSS files etc.

Our Actions:

  • Source Code Modification: We have modified a few areas in their source code to implement a few business logic in a better and simpler approach.
  • Implementation of Caching: Implemented proper caching where required.
  • Database Index: Include some Database Index to optimize the query performance.
  • Query Optimization: Used Tempt Table to join query with product table instead of running WHERE / IN query for a list in the product table.
  • Updating CrwalersOnly XML: We have updated browscap.crawlersonly.xml which includes a wide list of bot user agents.

The Outcome:

  • Lighting Fast Page Load Speed: After optimization, the site's pages take less than a second in regular site visiting hours and not more than 5 seconds in extreme pick-hours.
  • Time-Out Issue Resolved: All Database time-out issues related to calls to the database are resolved. The maximum time taken for a Database request to pull products is now only 1.6 seconds, by the search products method.
    Image 1.3: Database CPU Graph After Resolving the issue.
  • Precise BOT Protection: The site now can detect most of the bots and handle them accordingly as a search engine customer instead of creating new guest customers.
  • PageSpeed Insights Findings: We found that they have unnecessary loading of JS files and large content like images is being served from the application server. They have a dependency on 3rd party JS and CSS files etc.

Further Recommendation :

  • We have suggested the client use CDN.
  • Minimize the use of third-party scripts and plugins.

Airloom: Soaring to New Heights with Improved Performance

Image 2.1: Airloom Homepage

Performance Issue Reported by Client:

  • Slow loading speed of site pages: A single page load takes 4 to 20 seconds in a regular scenario and 10 to 30+ seconds in extreme cases.
  • Spam Registration and Bot Browsing: Tens of thousands of fake customers were created in the database and contributed to the slowed page-load of the website by bots.
  • Spikes in Server Performance Graph: A lot of spikes in the CPU performance graph are seen, even on a very limited number of visitors to the site.
  • Slower Load speed on Mobile devices: Some pages on mobile devices take more than 20s to load.

Our Findings:

  • Non-Standard Implementation of Business Logic: We have found that they have implemented some of the business logic in a non-standard and incorrect way, which led to too many requests to the Database, leading to performance downgrade and taking a long time for the query execution – in the worst case which sometimes takes 5 minutes to load a particular page.
  • Use of Old Version of nopCommerce The client was using nopCommerce version 4.20. The use of the outdated version of nopCommerce contributed to significant performance issues, as older versions lack essential updates, security patches, and optimizations, hindering the website's speed, functionality, and overall user experience
  • Lack of Cache Implementation: We have found that they did not implement proper caching techniques to reduce the number of requests to the Database.
  • Use of Non-Optimized Images: We found that unoptimized images were being used on the site. The utilization of non-optimized images adversely impacted performance by increasing page load times, consuming more bandwidth, and diminishing the overall user experience due to larger file sizes and slower rendering on the website
  • Database Server in the Wrong Availability Zone: We found that the client’s database server was hosted in the wrong region leading to unnecessary latency for customers, causing delays in data retrieval and transaction processing. This geographic misalignment resulted in slower response times, impacting the website's overall performance and user satisfaction.

Our Action:

  • Upgrade nopCommerce to Later Version: We upgraded the nopCommerce version from version 4.20 to the latest 4.60 version. Upgrading from nopCommerce version 4.20 to the latest 4.60 version resulted in a substantial performance boost, harnessing the advancements offered by .NET 7. The migration brought about notable feature enhancements and performance optimizations introduced by nopCommerce in its 4.60 release, contributing to a more efficient and powerful online store.
  • Use of Old Version of nopCommerce The client was using nopCommerce version 4.20. The use of the outdated version of nopCommerce contributed to significant performance issues, as older versions lack essential updates, security patches, and optimizations, hindering the website's speed, functionality, and overall user experience
  • Cleaning Junk Data from the Database in Generic Attributes, Categories, Products, and Manufacturer Table: We removed redundant or obsolete data from the database, specifically in generic attributes, categories, products, and manufacturer tables, contributing to enhanced performance. This cleanup process ensures a more streamlined and efficient database structure, reducing unnecessary load times and optimizing overall system responsiveness.
  • BOT Restriction: In order to mitigate bot registrations and spam, our team developed an anti-bot registration plugin. This plugin utilises IP-based blocking to detect and block bot registration attacks on the site, enhancing security and helping to mitigate spam.
  • Brought Source Code Modification to Plugin: We have converted the direct source modification in the older version of the project into plugins in following a development approach that improves the performance of the application.
  • Query Optimization: Used Tempt Table to join query with product table instead of running WHERE / IN query for a list in the product table.
  • Implementation of Caching: Implemented proper caching where required.
  • Database Index: Include some Database Index to optimize the query performance.
  • Image Optimization: By implementing the WebP image format and addressing the presence of unoptimized images on the site, we successfully mitigated performance issues caused by larger file sizes, slow rendering, and extended page load times. The adoption of WebP, along with the identification and optimization of weighty images, significantly improved bandwidth efficiency and enhanced the overall user experience by ensuring faster and more streamlined content delivery.

The Outcome:

  • Lighting Fast Page Load Speed: After optimization, the site's pages take less than a second in regular site visiting hours and not more than 5 seconds in extreme pick-hours.
  • Precise BOT Protection: The site now can detect most of the bots and handle them accordingly as a search engine customer instead of creating new guest customers.
    Image 2.2: Airloom Server Current Performance

Optimizing nopCommerce Websites: A Deep Dive on How We Optimize Your nopCommerce Store

Caching Strategies for Swift Navigation:

  • Server-side caching: We implement server-side caching when and where applicable to reduce server response time.
  • Client-side caching: We implement client-side caching that enhances page rendering speed.
  • CDN Integration: We ensure an efficient distribution of static assets like images, CSS, and JavaScript through CDN Integration.

Comprehensive Optimization Techniques:

  • Anti-bot Protection: We ensure safeguarding against WebCrawler activities. We implement advanced anti-bot protection measures to safeguard against WebCrawler activities, ensuring a secure and efficient online environment.
  • Minification and Bundling: We minify the CSS and JavaScript files to reduce the unnecessary bandwidth consumption from the server to the client, leading to an improved page load speed.
  • Lazy Loading: We implement lazy loading that enhances page loading speed.
  • Image Compression and Optimization We identify and recommend reducing the size of the static content like images that helps improve load times for better user experience.

Code Review and Version Upgrade:

  • Code Optimization: We rigorously review your code base and identify the problematic areas in your code that hinder a faster page load. We optimize the code and eliminate the bottlenecks that help gain performance improvements.
  • nopCommerce Version Upgrade: Keeping your nopCommerce version upgraded to the latest version is a key performance factor. Be it direct source code customization or a pure plugin-driven website – we upgrade our client’s nopCommerce website to the latest version of nopCommerce. It ensures access to the latest features and performance enhancements.

Server and Database Fine-Tuning:

  • Server Audit & Optimization: We meticulously examine your server infrastructure to identify inefficiencies and potential bottlenecks. We then implement strategic optimizations, fine-tuning server settings, and enhancing performance parameters to ensure a seamless and high-performing nopCommerce environment, ultimately optimizing the overall user experience.
  • Selecting the Right Server Instance/Type: We perform thorough assessment of your website's requirements, allowing us to recommend and configure the most suitable server instance or type. By aligning server specifications with your specific needs, we ensure optimal performance, scalability, and resource utilization for a robust and efficient nopCommerce platform.
  • Hosting the Site on the Right AZ: Selecting the right Availability Zone is crucial for optimal performance of your website. We ensure strategic placement of your nopCommerce website on the most suitable Availability Zone (AZ) within the cloud infrastructure. By carefully selecting the right AZ, we optimize resource allocation, enhance reliability, and improve overall site performance, ensuring a seamless and responsive user experience for your online business.
  • Database Optimization:Thorough database optimization, including the removal of unnecessary data, indexes, and tables, along with query optimization for improved speed and efficiency.

In conclusion, nopStation's Proof of Concept, as evidenced by the outstanding results from the E-Commerce client in Europe, and Airloom, the client from South Africa exemplifies the transformative power of comprehensive performance optimization. As businesses continue to evolve, nopStation stands as a reliable partner, ensuring that nopCommerce stores not only meet but exceed performance expectations.

Contact Us

Contact Us

03 nopCommerce MVP

60+ nopCommerce Certified Developers

Technology Partnerships