• Resolved SoN9ne

    (@son9ne)


    Hello,

    I am currently in the process of optimizing my site. I noticed that I am having duplicate queries with this plugin. It seems that calls are duplicated 6 times per page load.

    I am using Query Monitor to see these queries.

    These duplicate queries are:

    SELECT *
    FROM wp_terms
    WHERE slug = 'necessary'
    
    SELECT *
    FROM wp_terms
    WHERE slug = 'obligatoire'
    

    This brings up some concerns:

    1. Why don’t you just make a single query to fetch these slugs? Multiple queries just for a slug change is not optimized at all. Although this is a minor issue since these queries are fast, it still has extra cost and larger systems need to optimize where they can. This just seems inefficient to me.

    2. Why not use cache? Setting this to a transient would yield better results. Even using the cache object in WP (non-persistent caching) would be better than making 6 queries per check.

    3. Why the need to do these queries 6 times per page load?

    • This topic was modified 2 years, 6 months ago by SoN9ne.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter SoN9ne

    (@son9ne)

    For further testing, I created a new WordPress website and installed only Query Monitor and this plugin. It still performs 6 queries. This makes it clear to be an issue with this plugin. Please optimize this as this is not ideal. I recommend to use the Object cache since it would cache it for the current request only.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @son9ne,

    Greetings from Webtoffee!

    Thank you very much for your valuable suggestion. We have added this to our backlogs and we will fix it in our future release.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Duplicate Queries’ is closed to new replies.