• Resolved Peter Westerlund

    (@peter-westerlund)


    I can see in Query Monitoring that Jetpack CRM has a lot of duplicated queries. It surprises me that Jetpack CRM isn’t using WordPress Object Caching since it’s the same developers behind it. Or is it a reason why? It would really help speeding up wp-admin if Jetpack CRM database queries would be more efficient.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @peter-westerlund

    We’re constantly working to improve things, and definitely are aware of some weak points, so thanks for pointing that out.

    Object caching can be a bit more complicated when dealing with a multi-user setup; in many cases, we need the current value in the database, which can be modified via third-party code, API calls, etc. Are there specific calls that are resulting in serious issues?

    Thread Starter Peter Westerlund

    (@peter-westerlund)

    No one takes that long time but it’s just that there are so many and together it’s at least half a second or more I would guess.

    This query is called 5 times and together takes 0,1 sec:

    SELECT option_name, option_value
    FROM subdoman0_options
    WHERE autoload = 'yes'

    It’s called from wp_load_alloptions()

    Then this query is called 69 times:

    SELECT?*
    FROM?subdoman0_zbs_settings
    WHERE?zbsset_key = 'secondaddresslabel'
    ORDER?BY?ID?DESC
    LIMIT?0,1
    Jay

    (@bluejay77)

    Hi @peter-westerlund,

    Thanks for sharing an example. While it’s true that there are definitely duplicate queries, none of them are taking a lot of time, as you noted. MySQL caches queries, too, so it’d be much quicker if the same query runs multiple times.

    There’s definitely a lot of room for improvement, and while this isn’t an immediate priority, you’re welcome to submit a PR in the?jetpack?repository here:

    https://github.com/Automattic/jetpack

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicated queries’ is closed to new replies.