-
Notifications
You must be signed in to change notification settings - Fork 125
Description
This function is used in a few spots to (primarily) get all entries and then slice out the desired ones in WPCOM_Liveblog::get_entries_by_time(), and then to calculate pagination in that function and WPCOM_Liveblog::get_entries_paged().
Normally this works fine, querying the list from memcached then slicing out relevant ones for a given timestamp interval is a fast operation. However, this falls over flat on large datasets. The default memcache max object size is 1MB, and on Liveblog posts with many entries, that can be exceeded, which ends up reading lots of data at once from the DB, as well as writing lots of data to memcache (which is immediately dropped).
get_comments() now has Date Query support, and it has some caching internally (although admittedly it's not great b/c the cache key uses the latest comment from the whole site).
To solve the large LB problem, we need to move away from this monolithic cache structure and query the DB, then add caching that only stores small chunks of data.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status