Okay
  Public Ticket #4479804
Tiered pricing site performance
Open

Comments

  • Danny Whitehead started the conversation

    Hi.

    We have seen a significant speed/performance drop that seems to coincide with the introduction of tiered pricing for most of the products on our site, for both B2B and B2C users, using B2BKing.

    We configure tiered prices as % discounts, rather than final prices.

    It's also worth noting that our most popular products tend to have a lot (sometimes over 200) variations, and the tiered prices are set per-variation.

    Is tiered pricing known to be a major performance hit?

    Is there anything else we can do (caching, setting the prices as final prices instead of percentages) that might improve performance?

    We use the Breeze caching plugin that comes with our Cloudways hosting, which controls Varnish, Object Cache Pro and Cloudflare caching.

  •  2,510
    WebWizards replied

    Hi Danny,

    Thank you for purchasing our plugin,

    Tiered pricing isn't normally a significant performance hit on its own. However, what does happen with your setup is that since each variation is different, it adds a unique pricing table per variation. So with 200 variations, that means 200 tables are displayed on the page (even if they're hidden initially) - that's definitely a lot of data and could explain the performance issue you're seeing.

    As a test, I'd suggest going to B2BKing → Settings → Other → Components (at the very bottom of the page) and activate "Disable group & tiered pricing" - that switch disables the tiered pricing code completely. This way you can test and confirm if the performance drop is indeed related to B2BKing.

     

    If it is related, we can troubleshoot further to see what exactly is adding the most load time. For example, if it's the tiered price table display, we could look at removing that or adding it differently so it only displays once per page (assuming all your variations have the same % discounts).

    Are you seeing the performance drop primarily on the single product pages?

     

    Another thing to consider - I'd recommend running some tests without Varnish and object caching. While these work great on static sites, with dynamic sites and B2BKing, we've sometimes seen them actually decrease performance overall because of how they handle dynamic content. I'm not saying that's definitely happening here, but it's worth testing without any caching/object caching to see if it makes a difference.

    Let me know what you find with these tests and we can work from there!

    Kind regards,
    Stefan

  • Danny Whitehead replied

    Hi Stefan.

    Thanks for you reply. I've tried your suggestions and they haven't made any noticeable difference.

    I tried turning all the caching off, but that doesn't make any difference. I suspect this is because I'm testing while logged in as an admin user, which bypasses all caching anyway.

    I tried "Disable group & tiered pricing", and that didn't make any noticeable difference either. This might be because our theme still pulls all the tiered pricing for products regardless of this setting (it just doesn't actually apply the tiered prices to the basket when it's disabled). In fact, I think the theme is querying B2BKing data for lots of elements of the site (menus, 'You may also be interested in' section etc). Even simple product pages with no variations seem to be slowed down.

    If you look at an example product page, you'll see that the tiered pricing table only appears once on the page already: https://suspectpackage.com/product/mtn-montana-colors-94-400ml/

    This may well be an issue that needs fixing in our theme. Switching to the 'Blocksy' theme and testing does make the page load quicker (down from around 20 seconds to around 6). I'm in conversation with our theme developers about site performance overall, so I'll mention this, but they can take a while so if you have any other ideas in the meantime, let me know.

  •  2,510
    WebWizards replied

    Hi Danny,

    Thanks for the detailed update on your testing.

    You're right that it could indeed be a theme optimization issue, especially since you're seeing such a significant difference when switching to Blocksy.

    Another thing you can try to help isolate the issue: temporarily disable B2BKing completely to gauge its exact impact on load time. This will give you a clear baseline of performance without any B2BKing queries at all.

    If you'd like, I can also do some troubleshooting directly to see if I can identify any specific bottlenecks. If you're able to share admin access to your staging site, I can take a closer look and see if there's anything specific I can find.

    Kind regards,
    Stefan

  • Danny Whitehead replied

    Hi Stefan.

    I'd already tried deactivating the B2BKing plugins altogether, but since out theme is now built to expect B2BKing data, it completely breaks the site, with critical errors and not displaying any products.

    I can give you admin access privately. What's the best way to send you the credentials?

  •  2,510
    WebWizards replied

    Hi Danny,

    For sharing admin credentials securely, feel free to share them here in this ticket or send them to our email at [email protected] - both options work for us.

    Kind regards,
    Stefan

  •   WebWizards replied privately
  • Danny Whitehead replied

    Also, I'm thinking of turning on caching for logged-in customers in our Breeze settings, which could help mitigate these performance issues, but I've been concerned about B2C users seeing B2B prices and vice-versa. Would you have any idea if this is likely?

  •  2,510
    WebWizards replied

    Hi Danny,

    Thanks for providing access - I went over your site and did some tests, looking at your B2BKing configuration, product setup, dynamic rules, and other plugins.

    I don't see any obvious bottlenecks from B2BKing itself. Usually what creates performance issues are dynamic rules (which you don't have) or extensive group/tiered pricing configurations. I tested deactivating all B2BKing modules including pricing through the settings, and didn't notice a significant difference in load times.

    This suggests the performance issue is likely more related to how your theme pulls and processes data, combined with overall site complexity. When I temporarily switched to Blocksy, performance improved somewhat but not dramatically, which indicates the issue extends beyond just theme optimization.

    Here's what I think you can realistically do at this point:

    1. Caching will be crucial here. You're absolutely right to be concerned about B2B/B2C price mixing with cached content - that's definitely something to be careful about. The solution would be to either have unique caches for each user or cache by user role. B2BKing can be configured to use WordPress user roles as shown here: https://woocommerce-b2b-plugin.com/docs/how-to-use-wp-roles-with-b2bking/ - this way B2B and B2C users could have different roles and be cached separately. Caching by role is quite common and might be your most feasible option with Breeze.

    2. Theme optimizations would likely help as well. Running microtiming tests could identify which specific parts take the most time, but that's something your theme developers would need to handle.

    3. Plugin optimization: Your site currently has 47 active plugins, which is on the high side. Websites typically perform best with around 20-25 plugins - at 50+ things get heavy. The impact can be exponential rather than linear, so I'd strongly recommend deactivating any plugins you can do without.

    Kind regards,
    Stefan