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

[Feature proposal] Improve performance for complexly joined query trees #24

Open
quorak opened this issue Oct 3, 2020 · 0 comments
Open

Comments

@quorak
Copy link

quorak commented Oct 3, 2020

Right now I includes up to 6 realtions in my query, to avoid n+1 queries. Building up this Object tree takes a lot of the time. Sometimes more that querying the data and processing the jbuilder. How about we only do it, if the cache is empty for this object.
I would imagine something like!

  1. Get only fields to generate cache_key from db like id, updated_at without building the object tree
  2. Get data from cache
  3. Get remaining data where cache was missed from database and process block for them, return cache for the others

What do you think?

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

No branches or pull requests

1 participant