New Landing How can we help? Atelier Slow site – content-product.php is a database fiend

Viewing 12 posts - 1 through 12 (of 12 total)
  • Posted in: Atelier
  • #212158
    tkstarley
    Member
    Post count: 5

    Hi,

    We’re using Atelier as a site and WooCommerce theme. Our site has about hundred products and variations.

    We’ve been having problems with slow site issues. I found it odd until I installed the WordPress debug bar, which can log and show the database queries.

    https://wordpress.org/support/plugin/debug-bar

    We have a ‘Featured Products’ Swift thing on the homepage, which shows four products. This page is hitting the database about 880 times! Removing this takes it back to the more normal (for WordPress) 80 queries.

    The Products listing, which shows the standard 12 products, is hitting the database over 1600 times!!!

    I did some hunting around, and traced it down to themes/atelier/woocommerce/content-product.php, which both the widget, and the WooCommerce shop use.

    As a quick fix to halve the queries on each of these pages, I removed (around line 172) this:

    
    if ( $product->is_type( 'variable' ) ) {		
      $available_variations = $product->get_available_variations();
    }
    

    The rest of the remaining ~80 queries per-product are spread around this template.

    This is, obviously, crazy amounts, and may explain some of the speed complaint issues on this forum.

    If someone on the Swift team could spare a bit of time to reviewing this template, that would be great.

    Thanks!

    #213008
    westcoastsurf
    Member
    Post count: 210

    Wow, 1600, crazy. I would love to see the admin follow up and fix fast. thnx tkstarley.

    #213010
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    The developer of theme will assist you shortly.
    Thanks
    Mohammad

    #213353
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    That is for the variable slider type – although makes sense to not call it if not using it, have changed that for the next update. Thank you for the heads up!

    – Ed

    #213526
    tkstarley
    Member
    Post count: 5

    That’s cool to remove loading of product variations, good to hear and thanks. But that is only part of the story, we’d still be getting around 800 queries on the product listing, even without that. The whole template needs a good review.

    Ok, thanks for you time. Good luck!

    #213535
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Thanks.
    -Rui

    #213599
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @tkstarley – can you let me know what you get with Twenty15 active, in terms of queries?

    – Ed

    #213638
    tkstarley
    Member
    Post count: 5

    Hey Ed,

    Good question. To confirm, we’re using the WooCom 2.3 templates.

    110 products (some content has slightly changed since first post), some with around 200 variants.

    Atelier – 1,537 queries
    Atelier with my mod – 888 queries
    2015 – 796 queries

    So right you are, I’ve got very high queries generally… and this seems to be the variants.

    WC have overhauled the way variants work in 2.4, so I hope when the theme gets updated to 2.4, that will help us with the many variants issue. Happy to test again when that happens.

    https://woocommerce.wordpress.com/2015/07/13/improving-the-variations-interface-in-2-4/

    Thanks,
    Kevin

    #213641
    tkstarley
    Member
    Post count: 5

    And just to confirm, same data, theme 2015, WC 2.4 = 88 queries.

    Get the theme updated to WC 2.4 🙂

    #213707
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Thanks for the info – how many do you get on Atelier with 2.4? As far as I’m aware we don’t have anything outdated on that front.

    – Ed

    #213759
    tkstarley
    Member
    Post count: 5

    Sorry, right you are. Atelier 1.73 w/ WC 2.4 == 1501 queries

    I have the feeling there is something not right here. I’ll investigate further.

    #214408
    David Martin – Support
    Moderator
    Post count: 20834

    Thanks, please let us know your findings.
    – David.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register