Automattic / liveblog

Liveblogging done right. Using WordPress.

Home Page:https://wordpress.org/plugins/liveblog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Author list not cached sufficiently

paulschreiber opened this issue · comments

See #417 #568.

The "fix" reduces the time between fetches. Only one fetch is needed per page load. No need to re-fetch the author list.

This code does an author search, rather than fetching a list of users. While we could cache the search results for each query that's probably going to be excessive because the likelihood of those terms being searched again could be pretty low, and only performed by a limited set of users.

Willing to be convinced otherwise if there is a demonstrably negative performance impact to not caching the searches.

Given the size of the entire user list is a few KB (even for hundreds of authors), fetching it all once and performing in-memory searches is much smarter. There's no reason to make a network connection each time.