[wp-trac] [WordPress Trac] #35454: `lazyload_term_meta` is called many time when calling `get_term_metadata`
WordPress Trac
noreply at wordpress.org
Fri Jan 15 08:40:25 UTC 2016
#35454: `lazyload_term_meta` is called many time when calling `get_term_metadata`
--------------------------+------------------------------
Reporter: sfai05 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+------------------------------
Comment (by sfai05):
Sure. I am running Wordpress 4.4 with Memcached.
I found out this problem due to super long response time on my admin
dashboard. And I find that the memcache get request is much higher then
before ( > 4000 for loading one page ).
The problem is the function `lazyload_term_meta` is added to hook
`get_term_metadata` duplicated if you called `WP_Query` for more then one
time. So when you run `get_term_meta` afterward the action
`lazyload_term_meta` will trigger multiple time. And in the function
`lazyload_term_meta` you will do multiple Memcache get depends on how many
taxonomy you have created.
I only do ~40 `get_term_meta` it already crashed my memcache server.
Now I set the flag `update_post_term_cache` to `false` in `WP_Query` to
keep my server running.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35454#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list