WHMCS Slow Loading Pages - PHP Xdebug Profiler

This project has been completed


Bug Report



Created By



General, Mercury, Billing Extension

We're aware of an issue which is affecting some of our customers running WHMCS v8 (slow loading pages). We identified the problem last 26th of November 2020.

Even though we managed solve most of the problems in a couple of hours, there is still a small number of customers experiencing slow loading.

We think the cause of the problem could be Class Autoloading of WHMCS that was introduced with v7. We don't use this feature in our modules. We use our own autoloader since v5 well before WHMCS introduced this concept.

We suspect that WHMCS autoloader is re-loading our classes even if it shouldn't and this is causing pages to load slowly. The good news is that after many attemps, we managed to reproduce the issue on one of our servers. We prepared Xdebug and started to profile snapshots.

As you can see from our first attempts, there's clearly something wrong. A cachegrind of 50.6 MB is not okay. It should have been around 5.85 MB. We will keep you posted as we get updates.

Your tips

You have to login in order to send a tip. Login