#3163 closed enhancement (fixed)
Prime last active post IDs
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.6 | Priority: | high |
| Severity: | normal | Version: | 2.0 |
| Component: | General - Performance | Keywords: | commit |
| Cc: |
Description
I've identified a nifty (and relatively obvious) performance improvement.
When querying for forums, topics, or replies, the last-active post caches are never primed. This makes WordPress go out and query for each of them individually, maybe miss the cache, and do all of the work again for each individual cache miss.
Instead of all that, let's ask each already-cached post object what their last-active, last-topic, and last-reply IDs are, and prime them.
In my testing, this can result in embarrassingly huge performance improvements, sometimes cutting the number of database queries by 50% or more depending on the intersection of post types, widgets, etc...
In 6698: