• Hi —

    I recently launched a large WooCommerce site with over 12,000 products and ~10,000 visitors a day. I am working with the host to fine tune the site for performance. One of the things they noticed that is affecting performance is the way your Wish List plugin works. They brought to my attention last week with the following findings:
    ——-
    One big potential issue that we’re seeing revolves around a plugin/theme feature which is going to put a lot of strain on the server when the site gets even moderate amounts of traffic to it. The issue stems from what are called “POST” requests, which interact with the server’s backend (either to fetch or update information on the server), each of which will put strain on the server. The problem with this is that the site appears to spawn these POST requests frequently, and based on my findings it appears to happen per-visitor, per-pageview. This is less than ideal because if every single visitor to the site is spawning hits to the server’s backend then development of the site has created a situation in which the server’s overall stability is directly tied to the amount of traffic the site actively has at any given time. This is a bad place to be since traffic influxes can topple the server and lead to slow response times (504 errors) or even site outages (502 or 503 errors).

    We’re seeing upwards of 3 calls to POST requests on product pages, such as the Egyptian Khopesh 2 which generates three calls to admin-ajax.php to fetch information revolving around Yith Wishlist Cart Fragments (something which is avoidable, and should never be called unless someone has actively added an item to their wishlist, but never on default viewers who haven’t engaged in the wishlist). This can be seen in action here:

    The calls happening on the page: https://i.getf.ly/4gu2YNP9
    The call’s response payload: https://i.getf.ly/5zuBejnE

    The issue is that most visitors will have an empty cart for most of their page views, especially their “initial view” since it’d be impossible for them to have an item in their cart/wishlist before ever visiting the site– but Yith/WooCommerce makes the uncached call anyways which adds strain to the server per-visitor to the site. This can be disabled with adjustments to the plugin’s configuration, or by adding additional plugins which specifically disable this site functionality we have seen customers have success with the aptly named Disable Cart Fragments Plugin which usually helps swiftly here.
    ——-
    In response to these findings, I installed the recommended Disable Cart Fragments plugin to try to disable this functionality. After 4 days of running this plugin, these are their additional findings:
    ——-
    Premature Wishlist AJAX calls via “YITH Wishlist”
    We’re still seeing Yith Wishlist calls happening on individual product pages for visitors which do not have items in their wishlist yet, which is one of the major contributors still. We ran the page through GTmetrix.com and when we hop into the “waterfall” section of the report we can see the call happening at the bottom of the page here: https://i.getf.ly/mXupn05Y. The good news is that it is less impactful than it was previously, but it still accounts for roughly 11% of all uncached traffic in the past 24 hours (14,600 calls out of a total of 129,958), so it’s worthwhile to ensure these calls are not happening until after someone adds an item to their cart.
    ——-
    Are you willing to look into how your plugin works and fix these issues to help improve performance?

    Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Antonio La Rocca

    (@therock130)

    Hi Kari

    Thank you for the detailed feedback
    We are already talking about this on our dedicated help desk, and I definitely look forward to hear your answer there

    Anyway, I’ll past here an extract of my answer, for anyone who may find the same issue with the plugin:

    Fragments will contain updated version of the Add to Wishlist button, and the reason why we load it is the page my be served by a cache, and we want the template to be updated for the current user
    […]
    there is an easy way to disable this kind of requests
    Just add the following snippet of code at the end of functions.php file of your theme or chld theme

    add_filter( 'yith_wcwl_reload_on_found_variation', '__return_false' );
    

    This should completely stop AJAX call performed by our plugin on single product page

    My store it is a little bit slow (Im sure it not Yith issue), but we have less than 100 products. Will it this code be suitable and adequated for us?

    Thanks,

    F. Cipolla

    Plugin Support Antonio La Rocca

    (@therock130)

    Hi @fcipolla

    As pointed out by the OP, this problem scales up with visitors requesting pages to your server, more than with the number of products
    Anyway, note also that this solution would only work if you’re using variable products, by removing a specific feature of the plugin (ATW button refresh on found_variation)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Significant performance issues with YITH Wishlist’ is closed to new replies.