[Hummingbird Pro] Hummingbird slows down site

I downloaded hummingbird and did all the necessary fixes that they requested. I"m not that savvy on site optimization, but the site now takes 3 seconds longer on every test I have run including Hummingbirds own speed test.

  • Adam
    • Support Gorilla

    Hello Tim Strampfer

    I hope you’re well today and thank you for your question!

    The Hummingbird is a great tool but the way it performs and the way it has to be configured, especially if it comes to Asset Optimization feature (but not only), depends a lot on the specifics of a particular site. Every site is different so there’s no fully “universal” way to configure it.

    That being said, I would like to take a closer look at the setup so would you mind enabling support access for me? To do so, please go to the “WPMU DEV -> Support -> Support Access” page in site’s back-end, click on “Grant support access” button there and let me know here once it’s done.

    I will also want to run a bunch of tests on site with- and without Hummingbird enabled so do you agree for this?

    Best regards,

    Adam

  • Predrag Dubajic
    • Support

    Hi Tim,

    Do you have any results of your site before you activated Hummingbird because I checked the results with some of the HB options disabled and I was getting loading times that were around 3 seconds more?

    When you activate Asset Optimization in Hummingbird it’s important to wait for a couple of minutes for minification and upload to CDN to finish because these will take some of the server resources and checking the site speed right away will give you wrong results, so you should give it a couple of minutes to “cool down”.

    I see that the results of your site are mostly low due to the number of files that are being loaded and you should further configure Asset Optimization to resolve this.

    This is can be a bit lengthy task due to the number of files you have, but you should switch to Advanced mode in Asset Optimization and in there try enabling as many options as possible.

    Note that some files don’t handle optimization well so I would suggest doing this in batches and if you notice any issues on your site disable optimization for files that are causing problems.

    Once you have most of your files optimized you should be able to see improvements on your site speed.

    Best regards,

    Predrag

  • Predrag Dubajic
    • Support

    Hi Tim,

    The optimization files are the frontend files, so JS and CSS, there’s optimization for PHP files.

    What this means is that if something goes wrong it will be only on the frontend, it will not prevent you from using your site, and it’s fully revertable by simply disabling the option you enabled beforehand.

    For example, you enabled combine option for one of the JS files and your slider stops working, you just disable that option and slider will be working again.

    My suggestion is to do this in steps by enabling options for couple of files at once.

    For example, you would take 10 files and enable all of the options for them, save and check the frontend after that.

    If there are no issues then go with next 10 files.

    If there are issues then disable the options one by one until you find which one is causing it, leave it disabled, and continue with next 10 files.

    It’s a bit lengthy task and unfortunately, it can’t be properly automated as each installation is unique due to the running plugins and themes, and their files will behave after being optimized.

    Best regards,

    Predrag

  • Luke Miller
    • Flash Drive

    If anything I’m happy the options to combine are easier with the plugin rather than combining them manually. I always knew that with all of our external plugins as well as our theme we would eventually require this so thank you for showing me how i can do this!

  • Patrick Freitas
    • FLS

    Hi Luke Miller

    How are you today?

    Thank you for the support access.

    I can see the Hummingbird CDN load really well, seems a file from contact 7 plugin is where the site is taking more time to load.

    [attachments are only viewable by logged-in members]

    Contact form 7 URL

    [attachments are only viewable by logged-in members]

    Seems it is calling a JSON file, you can give a try increasing the max execution time and WordPress memory limit.

    [attachments are only viewable by logged-in members]

    Increases the max_execution_time to 150, guide on, https://wpmudev.com/blog/increase-memory-limit/

    For the WP_MEMORY_LIMIT increases to 128M, the default WordPress Memory Limit is 40M

    [attachments are only viewable by logged-in members]

    https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    Then check if the site loads faster without wait time for that URL.

    Best Regards,

    Patrick Freitas

  • Predrag Dubajic
    • Support

    Hi Luke,

    Do you have any of the older scores saved so we can make a comparison because when I check your site now the biggest issue is with the external resources that are loaded on your site?

    Within the score results, there are a bunch of Google maps resources loaded and together they are taking up over 3 seconds of your total load time.

    This is, unfortunately, something that you can’t affect further since it’s being loaded from an external source and it can’t be handled by your site.

    Best regards,

    Predrag

  • Luke Miller
    • Flash Drive

    So what your saying is any site that has a google map cannot have a fast load speed?

    Also if you notice in the score there is a low score for deferring parsing of javascript and include 5 wpmu cdn files. Additionally on the Yslow score, we get an F grade for usage of a CDN. Are we implementing the CDN incorrectly?

    https://gtmetrix.com/reports/thesuffolkpersonalinjurylawyer.com/hjPcFekD

    [attachments are only viewable by logged-in members][attachments are only viewable by logged-in members]

  • Adam
    • Support Gorilla

    Hi Luke Miller

    So what your saying is any site that has a google map cannot have a fast load speed?

    It’s not quite like that :slight_smile:

    The point is that you can’t do much about any resources that are hosted externally but the way they affect site’s loading speed is a sum of quite a lot of things. First of all, if you run multiple tests you should notice that the delay they cause is not quite consistent in a long run – sometimes it will be significantly longer, sometimes much shorted. As with any other resource, the serving server load and connection load may vary and this affects things.

    Then it’s also a matter of “how it all relates to/interacts with” your site’s scripts (so WP itself, code of theme and plugins). Often, it’s also a matter of… other resources actually. For example, if you take a look at the “Waterfall” in GTMetrix, you’ll notice that there are “sets” of resources that are loaded in parallel, then there are other “sets” that are also loaded in parallel but after previous ones were fetched – and so on.

    This usually means that one of the assets (or some of them) in such “parallel group” is “render blocking” or some other is “waiting” for others to load. It’s a bit difficult to explain. Anyway, on your site, for example, I can see that right before some CF7 and RevSlider assets there’s a “block” of resources related to Google Fonts that are fetched after earlier resources has been fetched but before these. In case of Google Fonts it’s possible to address this by making them local.

    While it’s not always easy and requires custom development (which, I’m afraid is a bit outside the scope of this forum), it’s doable and it would let you defer/asyn these resources, thus making “one column less” in “Waterfall” tab – so efficiently that should again “shorten” the overall load time.

    Here’s a nice write-up on making Google Fonts local:

    https://speckyboy.com/speed-google-fonts-wordpress/

    Then you got “next column” which is some CF7 resource and some RevSlider scripts. As for Contact Form 7, that’s a known issue with “refil” URL (which, I believe, is related to captcha) and is actually something that CF7 developers should take care of but there’s a suggested workaround that you can try:

    try adding this JS code to the footer of your theme:

    wpcf7.cached = 0;

    i’m not sure if your theme has an option to add custom JS to the footer specifically but if not, you can try creating an mu-plugin like this:

    – create an empty file with a .php extension (e.g. “cf7-performance-fix.php”:wink:

    – copy and paste following code into it:

    <?php
    function cp-perf-fix-js() {
    ?>
    <script type="text/javascript;">
    wpcf7.cached = 0;
    </script>
    <?php
    }
    add_action( 'wp_footer', 'cp-perf-fix-js' );

    – save the file and upload it to the “/wp-content/mu-plugins” folder of your site install; if there’s no “mu-plugins” folder there, just create an empty one.

    Make sure to clear all caches after that and check the site and you should see if the URL ending with /refil shows up in GTMetrix “Waterfall” tab or not and if it does, if it’s still in “second column” or if it’s “parallel” to other resources. Please note: it’s a suggested workaround but I can’t guarantee it will work flawlessly as it’s not an official solution from CF7 developers. It’s worth a try though.

    Then you got Slider Revolution resources listed in the same “column”. This is again something that can be tested “experimentally” as there’s no “rule” on how to fix that. In some cases simply running Hummingbird’s Asset Optimization will help, in some additional settings in Revolution Slider would be required and in some you just need to accept the way it is as otherwise it breaks site – there’s really no “science” behind this, it’s a “trial and error” thing to set. The options you might want to experiment with are

    “Insert JavaScript into Footer”, “Include RevSlider libraries globally” and “Defer JavaScript loading”

    on “Slider Revolution -> Global Settings” page.

    However, it must be noted that changing any of these options might in fact cause Asset Optimization to be adjusted again.

    In general, analyzing a “Waterfall” tab that way, can help quite a lot but the downside is that it might also mean quite a lot of additional and custom changes to address that all. Some of assets simply cannot even be made “parallel” in any way and it’s really something very individual to the site and something that requires a lot of daunting and meticulous checks and sometimes even custom developed code.

    Also if you notice in the score there is a low score for deferring parsing of javascript and include 5 wpmu cdn files.

    Yes, I can see this. The Hummingbird attempts to compress, combine and defer as many JS/CSS resources as possible (taking Asset Optimization settings into account of course) but not all scripts can be always combined together or moved. It’s trying to do “best it can in a given case” but that might still need some “trial and error” setup of Asset Optimization. I can see that most of the JS resources are set to be moved to footer and loaded after the page has been loaded but it’s also possible that some of them must actually have one of these options disabled to let Hummingbird “better combine” and serve resources. Again, as much as I’d love to tell you precisely what to do, this is very individual to the site and there’s no pattern/rule that you could apply – it’s all experimenting with options combinations until you still got the site working and can’t “squeeze” any better results; at such point – regardless of what the score is – it’s the best you can get from the site.

    Additionally on the Yslow score, we get an F grade for usage of a CDN. Are we implementing the CDN incorrectly

    One thing you could easily improve would be actually getting rid of emoji-related JS. If you’re not using classic emojis on your site in front-end, you can safely disable loading them and you can do it by switching “Remove the default Emoji JS & CSS files” option on on “Hummingbird -> Advanced Tools -> General” page.

    Then there’s a set of JS scripts and images reported. I see that the JS scripts reported there are not detected by Hummigbird and that means that they must be loaded in some either “non-WP-standard” way or somehow they are included “dynamically”. This, I’m afraid is not something that could be addressed easily. On the other hand, I’m pretty sure that apart from the score itself it doesn’t really affect loading speed in any noticeable way. There’s too little of these resources and they are being loaded in parallel to one another mostly – it’s not something that user “see” during loading.

    As for images – you are using CDN correctly. However, there are still some specific images that are not (yet!) supported. Those would be images that are added as CSS background (they are not processed by Smush CDN yet) and in some cases images coming from some “dynamically created” markup or if they are “printed out” to the site “too late” during load or in some non-standard way. I can see that one of such images is e.g. image from slider on the main site that comes from Revolution Slider.

    Again, that’s a score that’s low but a single image or two on a complex site isn’t that much of a problem – if there were tens of hundreds of such images, that could create significant slow downs. However, we’re working on adding support for such images to Smush CDN in future so that will get “automatically addressed” with one of future updates.

    Kind regards,

    Adam