[wp-trac] [WordPress Trac] #22301: Performance problem with Recent Comments widget
WordPress Trac
noreply at wordpress.org
Tue Oct 7 16:56:59 UTC 2014
#22301: Performance problem with Recent Comments widget
--------------------------+--------------------------
Reporter: pento | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Comments | Version: 2.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+--------------------------
Comment (by kovshenin):
Took a stab in [attachment:22301.2.diff]. The idea is the same and it also
accounts for multiple instances of the widget.
It's not perfect. I think there's still potential for race conditions
because the lock is not guaranteed, i.e. if the hard work (comment query)
has been done, we save the data in cache, regardless of any locks + the
fact that there's no easy way to force `wp_cache_get` not to use local
cache.
Also, what happens if the comment query times out and halts the php
process? We'll end up with a lock that will never be released. How can we
clean that up or should we even attempt to? Would scheduling a single
event instead solve these issues? Are there other areas in core that could
benefit from a similar approach?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22301#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list