• Resolved pstidsen

    (@pstidsen)


    Hi there,

    This autoloaded plugin database option is more than 250 kB in our site. Is it possible to reducde or avoid autoloading?

    _transient_saswp_nav_menu31

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Sanjeev Kumar

    (@sanjeevsetu)

    Hi pstidsen,

    The wp_get_nav_menu_items() function retrieves complete menu data each time it is executed. To make the process more performance-efficient, we store the menu data in a transient (_transient_saswp_nav_menu..) so it can be reused without repeatedly fetching the same information.

    Regarding your concern that the autoloaded plugin database option is more than 250 kB. We don’t consider this to be particularly large, as it is still within the kilobyte range and not unusually high for cached menu data.

    Please let us know if you notice any specific performance impact, and we’ll be happy to investigate further.

    Thread Starter pstidsen

    (@pstidsen)

    Hi @sanjeevsetu,

    Firstly, I made a typo – I would have written that it is more than 350 kB instead of 250. According to the docs, the total size/sum of autoloaded options shouldn’t be more than 800 kB. Your 350 kB takes up 45 % of the recommended total. I would defintely consider that as particularly large. Aditionally, the gap to the second biggest autoloaded options is huge as well meaning there is something off about the autoloaded transient here.

    I have checked the content of the transient, and I see lots of stuff/properties that does not bring any value. What about stripping that out before saving the transient/option?

    Empty/irrelevant might include post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_mime_type, comment_count, to_ping, post_content_filtered. Autoloading these things at every load looks a bit bloated.

    Plugin Support Sanjeev Kumar

    (@sanjeevsetu)

    Hi @pstidsen,

    Thank you very much for your detailed analysis. We truly appreciate the time you took to investigate this.

    We can now clearly see that some unnecessary data is being stored in the _transient_saswp_nav_menu option, which is increasing the autoloaded data size.

    We will take a deeper look into this and work on optimizing it in the upcoming updates.

    We have created a GitHub ticket to track this improvement:
    https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/2416

    Thanks again for bringing this to our attention 🙌

    Thread Starter pstidsen

    (@pstidsen)

    Awesome! Looking forward to see an update for that in the futur 🙂 Hopefully, it will reduce TTFB with some miliseconds – and that’s always a nice improvement.

    Plugin Support Sanjeev Kumar

    (@sanjeevsetu)

    Hi,

    We have released a fix for this issue in the latest version 1.57. Kindly update the plugin, delete the existing transients, and allow the plugin to generate new transients for the menu. Then check whether the autoload size has been reduced.

    Thread Starter pstidsen

    (@pstidsen)

    Hi @sanjeevsetu

    Thanks for the update. I did update the plugin last week. And actually, there is no _transient_saswp_nav_menu option yet. Is that an error?

    Thread Starter pstidsen

    (@pstidsen)

    Hi again,

    Now it has regenerated and the size is dramatiacclly reduced.

    Plugin Support Akshay A

    (@akshaycode1)

    Great to hear that it works for you. We are closing this thread for now. Feel free to reach out to us anytime.

    Have a great day!

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.