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?
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!