Theme optimizations - by jrevillini - on WordPress WooCommerce support

This topic has 12 replies, 5 voices, and was last updated 7 years, 3 months ago ago by Eva Kemp

  • Avatar: jrevillini
    jrevillini
    Member
    September 6, 2015 at 13:57

    I’m noticing some things the theme is doing which may be able to be optimized. These are kind of picky, but on an active site with an advanced woocommerce system, anything that can be optimized comes into question. I’m using the plugin Debug Objects to do this research.

    file: /wp-content/themes/woopress/framework/theme-functions.php
    1. line 608
    1.0ms (0.000967025756836s)
    UPDATE wp_options SET option_value = ‘1’ WHERE option_name = ‘sc_chat_validate_license’

    I don’t have the Screets Chat plugin activated, yet the plugin runs this on every admin page load. I suggest only running this on activation.

    2. line 3067 & 3044
    0.2ms (0.000231981277466s)
    SELECT option_value FROM wp_options WHERE option_name = ‘etheme_custom_sidebars’ LIMIT 1

    Seems normal but gets run twice on every admin page load

    file: wp-content/themes/woopress/framework/inc/taxonomy-metadata.php
    3. line 57 & 34
    0.4ms (0.00043511390686s)
    show tables like ‘wp_taxonomymeta’

    Not really sure why this would be run twice or at all, but it gets run every admin page load

    file: wp-content/themes/woopress/option-tree/includes/ot-cleanup-api.php
    4. line 69
    0.3ms (0.000349044799805s)
    SELECT * FROM wp_posts WHERE post_type = ‘option-tree’ LIMIT 2

    AND

    line 70
    0.3ms (0.00032901763916s)
    SHOW TABLES LIKE ‘wp_option_tree’

    The cleanup doesn’t really need to run every admin page load, does it? Maybe just trigger the check on option-related pages, then do a check once per hour if it’s really necessary to monitor.

    11 Answers
    Avatar: Brian Johnson
    Brian Johnson
    Member
    October 7, 2015 at 15:55

    Hello

    Thank you for showing the way to optimize theme. It is very likely we will take your hints in consideration for future releases. If you have any questions be free to contact us.

    Regards,
    Brian johnson

    Avatar: webdesignit
    webdesignit
    Participant
    December 23, 2016 at 02:01

    Has the above been looked at ? I’m currently in the process of optimizing my site and noticing the sc_chat_validate_license constantly appearing – often taking up to 0.4s .. and screets isn’t even installed on my legenda site! this seems like very poor optimization, especially since you guys have known about this issue.

    How do I resolve this ?

    Thanks

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 23, 2016 at 11:32
    Avatar: webdesignit
    webdesignit
    Participant
    December 25, 2016 at 05:29

    Caching was all off because I was doing testing… If you look now its as it was..

    Back to the original issue though.. Is there a fix?- how can I stop the screets license from being queried in sql repeatedly when its not even installed?

    Kind Regards,
    Tom

    Avatar: Eva
    Eva Kemp
    Support staff
    December 26, 2016 at 17:38

    Hello,

    Could you please show a screenshot where you see the notice regarding sc_chat_validate_license?

    Regards,
    Eva Kemp.

    Avatar: webdesignit
    webdesignit
    Participant
    December 27, 2016 at 05:43

    https://s23.postimg.org/rrhmqpzqz/screets.jpg

    This shows up in Query Monitor under slow queries on pretty much every page(front&backend).. sometimes other queries show up depending on whats rendering, but this one is always there – the time it takes changes alot from 0.01 > 0.9.

    Since I’m trying to optimize as much as possible I’d really just like a way to prevent this query on every page – Can I perhaps remove some lines from the files indicated in the OP ? or a snippet to prevent it from running maybe ?

    Kind Regards and Merry Christmas!
    Tom

    Avatar: Eva
    Eva Kemp
    Support staff
    December 27, 2016 at 16:50

    Hello,

    Do you mean you see that notice in your database?
    Could you please show full screenshot to have clear understanding?

    Regards,
    Eva Kemp.

    Avatar: webdesignit
    webdesignit
    Participant
    January 1, 2017 at 23:57

    Happy new year, hope everyone has a great start to it 🙂

    Ah no the message is in Query Monitor, which reports on SQL queries being actioned by wordpress.. below are 2 screenshots showing the plugin operating within the context of the site.

    The page loads.. queries are reported on up top- accessed by the dropdown menu
    https://i.imgsafe.org/9885fc8448.jpg

    Can then click and see details on queries
    https://i.imgsafe.org/9885ede1a4.jpg

    Avatar: Eva
    Eva Kemp
    Support staff
    January 3, 2017 at 17:08

    Hello,

    Please check if the problem persists with default WordPress theme.
    Let us know the result.

    Regards,
    Eva Kemp.

    Avatar: webdesignit
    webdesignit
    Participant
    January 3, 2017 at 22:08

    Hey,

    Tested – using twenty seventeen theme the sc_chat_validate_license query does not show up.

    Cheers,
    Tom

    Avatar: Eva
    Eva Kemp
    Support staff
    January 5, 2017 at 16:09

    Hello,

    We’ve forwarded this issue to our developers and it should be fixed in one of the theme updates.
    Please take our apologies for inconveniences.

    Regards,
    Eva Kemp.

  • Viewing 12 results - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.