Load time issues on site: Custom Sidebars - 13.0023 sec - 78.31%

My clients site is running very slowly, when I run the performance analyzer, Custom Sidebars account for 78% the total loadtime.

Please see results.

WordPress Plugin Profile Report
===========================================
Report date: January 5, 2015
Theme name: Roots
Pages browsed: 28
Avg. load time: 17.9508 sec
Number of plugins: 33
Plugin impact: 92.49% of load time
Avg. plugin time: 16.6029 sec
Avg. core time: 0.8554 sec
Avg. theme time: 0.1413 sec
Avg. mem usage: 176.26 MB
Avg. ticks: 102,822
Avg. db queries : 228.29
Margin of error : 0.3511 sec

Plugin list:
===========================================
P3 (Plugin Performance Profiler) - 0.0041 sec - 0.02%
Register Theme Directory - 0.0004 sec - 0.00%
Widget CSS Classes - 0.0218 sec - 0.13%
Worker - 0.0430 sec - 0.26%
BackupBuddy - 0.0343 sec - 0.21%
Custom Sidebars - 13.0023 sec - 78.31%
Google Analytics For Wordpress - 0.0264 sec - 0.16%
Gravity Forms Constant Contact - 0.0185 sec - 0.11%
Gravity Forms - 0.1081 sec - 0.65%
Groups - 0.2160 sec - 1.30%
Intense WordPress Plugin - 0.5219 sec - 3.14%
Jetpack by WordPress.com - 0.3450 sec - 2.08%
Per Post Editors - 0.0269 sec - 0.16%
Post Thumbnail Editor - 0.0024 sec - 0.01%
Rich Text Tags, Categories, and Taxonomies - 0.0008 sec - 0.00%
SearchWP WP Job Manager Integration - 0.0101 sec - 0.06%
SearchWP - 0.0759 sec - 0.46%
The Events Calendar - 0.1567 sec - 0.94%
WooCommerce Catalog Visibility Options - 0.0147 sec - 0.09%
Woocommerce Clickandpledge Gateway - 0.0067 sec - 0.04%
WooCommerce Subscriptions - 0.1359 sec - 0.82%
WooCommerce - 0.2956 sec - 1.78%
WooThemes Helper - 0.0220 sec - 0.13%
WordPress HTTPS - 0.8103 sec - 4.88%
Wordpress Seo - 0.5979 sec - 3.60%
WP Crontrol - 0.0009 sec - 0.01%
WP Job Manager - 0.0176 sec - 0.11%
WP Migrate DB Pro Media Files - 0.0028 sec - 0.02%
WP Migrate DB Pro - 0.0212 sec - 0.13%
WP Smush.it - 0.0186 sec - 0.11%
Wp Super Cache - 0.0158 sec - 0.10%
Wpmudev Updates - 0.0275 sec - 0.17%
MLI Sitewide Plugin - 0.0007 sec - 0.00%

  • Michael Bissett

    Hey @natebald, hope you're doing well today! :slight_smile:

    Yikes, that's a really long load time! (16.6 seconds)

    I'm not able to replicate this on my test site, but there could possibly be a conflict with another plugin, or even the theme. We’ve got a handy basic troubleshooting flowchart over here:

    https://premium.wpmudev.org/manuals/getting-support/

    Could I ask you to have a go at that, if you haven't done so already, that is? :slight_smile:

    That'd really help us to narrow down the cause of this extremely long load time. Also, could you please enable Support Access to your site?

    Kind Regards,
    Michael

  • Ash

    Hello @natebald

    We have little performance issue in the Custom Sidebar plugin (our developer is working on that as described here https://wordpress.org/support/topic/bad-performance-2?replies=6#post-6071226 ), but that should not be huge.

    Can you install the plugin "Query Monitor" and have a look at the queries/stuff going on? Something must happen when Custom Sidebars is active and Query Monitor might tell us what it is.

    Also, as this is a live site, can you please create a replica test site where we can do some experiment?

    Cheers
    Ash

  • Philipp Stracker

    Hi Nate,

    thanks for posting this issue and sorry for the delay, I'm currently working on some other high-priority issues so I did not respond here right away... We have tried to reproduce the issue on our dev/live installations but we had no performance issue whatsoever.

    So I'm "happy" that you're able to reproduce and reported the issue: It would be a great help if you enabled the Support-Access to your dev site again so I can have a look at it there! Just as additional info I'm curious what web server and PHP version your sites are running on. A user in wordpress.org mentioned that he performance was good after updating the server version (he did not provide more infos though) - maybe this is an issue that happens only on a specific PHP version or similar...

    Thanks! I'll let you know what I discovered once we get support access to your site.
    I assume it is okay if I enable/disable some plugins and switch the theme on that site, if not please tell me :wink:

  • natebald

    Here is the php info for the live site
    Version 5.3.26
    max_execution_time 30
    open_basedir
    memory_limit 256M
    upload_max_filesize 64M
    post_max_size 64M
    display_errors
    log_errors 1
    track_errors
    session.auto_start 0
    session.cache_expire 180
    session.cache_limiter nocache
    session.cookie_domain
    session.cookie_httponly
    session.cookie_lifetime 0
    session.cookie_path /
    session.cookie_secure
    session.gc_divisor 1000
    session.gc_maxlifetime 1440
    session.gc_probability 1
    session.referer_check
    session.save_handler files
    session.save_path /www/vapache/pixelsadm/sessions
    session.serialize_handler php
    session.use_cookies 1
    session.use_only_cookies 1
    error_reporting 4983
    E_ERROR
    E_WARNING
    E_PARSE
    E_CORE_ERROR
    E_CORE_WARNING
    E_COMPILE_ERROR
    E_USER_ERROR
    E_USER_WARNING
    E_RECOVERABLE_ERROR
    E_ALL
    Extensions apache2handler, bcmath, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zlib

    I have enabled remote access on the dev site once again.

  • Philipp Stracker

    Hi Nate,

    I just did several tests on your installation, and I could repoduce the slow performance with Custom Sidebars in P3 profiler.

    However, as I investigated the issue I now believe that the result does not reflect the real performance:
    The performance issue exists *only* when P3 plugin is enabled. Once I disabled the P3 plugin there was no performance difference in page load-time when comparing the site with/without Custom Sidebars (in both cases the load time was arount 1.7s - 2.5s in most cases)
    I have not found the reason why P3 + Custom Sidebars is slowing down the site so drastically.

    Now the strange thing: When I tested the same thing a second time, then the Performance was back to normal, even with P3 and Custom Sidebars enabled...

    A thing to consider with P3:
    The 'Autoscan' feature will always scan your site as logged-in user (typically Admin) and also scan the admin pages. To get a more reliable perspective on the visitor experience click the 'Manual scan' button, then open another window and open some pages of your websites front-end as normal visitor. While Manual scan is enabled, P3 will profile all these pages you open in the second window. When you're done finish the test in the first window and view the results...

    I did a quick check and got this result:
    http://take.ms/aP9O2 Custom Sidebars is among the fastest plugins now...

    My conclusion
    P3 modifies some PHP settings (things like caching are disabled) and also adds a low-level PHP hook that is executed after every single PHP command (register_tick_function) - so naturally the page is slower when P3 is running. Either the modified PHP settings or the tick-function causes Custom Sidebars to execute code redundantly while logged in.

  • natebald

    Philipp, I disagree on your last post, Custom Sidebars does have an impact on Database-performance. How could it not? One every page load a DB query must be run in order to display or not display what widget where.

    That being said, logically one would install P3 because of performance issues to see what is causing site slowness, so that being said, the site issues existed prior to P3 being installed. After installing the P3 plugin I discovered that Custom Sidebar was having huge impact on site load time, both on my staging development site/server as well as the live site/server.

    I opened this support request up 9 days ago, and to be frank, I was tired of waiting for a reasonable solution here. I did my research and found wp-rocket caching plugin, once installed and clicking a few buttons, the sites speed increased 10 fold.

    If I disable wp-rocket and run the scan again, I again get similar results to what I displayed before.

  • Philipp Stracker

    Nate, you are right: There is a DB-impact when Custom Sidebars is enabled. What I meant was, that the 2-3 queries that are executed on your site make up for so little difference that it was *impossible* to tell a difference (I'm refering only of the DB impact, not the site loading time!)

    So to get some clarity I did the following test to find out if Custom Sidebars has a performance impact on the page loading time of your website:

    Loaded the page http://www.yournewdevsite.com/mli/mission 12 times and compared the page loading time. The loading time was output in the shutdown hook of wordpress using the value of timer_stop()
    While testing, the following plugins were deactivated: WP Rocket / P3 / Query Monitor.
    Number is the page loading time in seconds

    Custom Sidebars enabled:

    As Admin: 2.8 / 1.7 / 2.5 / 1.9 / 2.0 / 2.6 / 2.8 / 1.8 / 2.3 / 1.7 / 1.7 / 2.5 (26.3) = 2.2
    As Visitor: 1.4 / 1.7 / 2.5 / 4.6 / 1.4 / 1.9 / 1.4 / 1.4 / 1.6 / 3.2 / 1.4 / 1.7 (24.2) = 2.0

    Custom Sidebars disabled:

    As Admin: 4.2 / 1.7 / 1.8 / 1.7 / 1.6 / 2.5 / 1.7 / 2.6 / 5.5 / 1.9 / 1.5 / 2.5 (29.2) = 2.4
    As Visitor: 1.5 / 1.5 / 1.5 / 2.5 / 2.6 / 1.6 / 3.9 / 1.5 / 1.6 / 1.4 / 1.6 / 1.4 (22.7) = 1.9

    I understand that you're trying to find the source of the performance issues. We have checked the plugin several times and made many performance optimizations to ensure the plugin does not eat up performance. In all our tests - including the ones I did today - we did not find any reproducable/concrete hint on a performance leak in the Custom Sidebars plugin.

    And yes, the P3 plugin is intended to measure plugin performance to find slow plugins. I hope that you understand that this kind of test (done by a WordPress plugin itself) is more a general guideline and not an absolute, and 100% reliable information. There are various aspects that can influence these tests, and as my above performance comparion shows: There was no noticable performance difference between Custom Sidebars enabled/disabled.

    If you can give us an URL where we can actually measure (a clear) a performance difference when Custom Sidebars is enabled and disabled then please give us that page to test. We're looking forward to improve our plugin. Just with the information available I could not find any problem, so we don't know what could be changed to improve the loading time...

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.