Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework caching, no longer cache html but cache expensive queries #548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cojennin
Copy link
Contributor

First pass at improving #505

Instead of caching the entirety of the html, cache some of the queries that go into building the post details screen (and aren't user dependent). I added about 300 posts to the calendar to check, and there are some small improvements. Have not seen any major performance degradation, though this function now goes uncached.

I'd prefer not to remove the cache in it's entirety without some further investigation, but this PR starts to untangle some of it from the calendar. I've also tried to improve some of the calls being made to other functions to eke out some small performance improvements, and consolidate some calls to functions that didn't seem necessary

Eventually, we could consider doing some things in future PR's like:

  1. Limiting the posts that get rendered per day
  2. Defer fetching details of a post until a user clicks the post
  3. Rendering the initial post information (i.e., title and type) client side

@mjangda
Copy link
Member

mjangda commented Dec 2, 2019

As discussed, this needs a bit more testing and profiling to see if this is a beneficial change (quick testing shows some benefits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants