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

Cache all SQL queries using sliding expiration #300

Closed
wants to merge 2 commits into from

Conversation

azygis
Copy link
Collaborator

@azygis azygis commented Mar 13, 2023

Closes #278.

@frankhommers
Copy link
Collaborator

I don't really get this. Is building a simple string really slower than retrieving it from cache?

Why are you using expiration? Do you think the options could change over time?

@azygis
Copy link
Collaborator Author

azygis commented Apr 19, 2023

The broader discussion is in #278, let's keep it there. "Slower" maybe not, but keeping allocations at minimum is always a good idea.

Regarding the expiration - there's no point in keeping the queries in memory indefinitely when there is no need for them for an extended period of time, for example any of the dashboard queries are irrelevant if you just check it occasionally, therefore can just expire.

@frankhommers
Copy link
Collaborator

I would choose a sliding expiration of 2 hours, instead of 30 minutes. That feels more feasible to me.

Did you compare benchmarks of previous versions and this one to compare allocations?

@azygis
Copy link
Collaborator Author

azygis commented Apr 19, 2023

I did as mentioned in the comment. It might be that the pull request isn't even worth it, hence it's still idling here. First want to try a few things from the linked issue, but free time is too limited right now.

@azygis
Copy link
Collaborator Author

azygis commented Apr 15, 2024

Closing as it's not something that's really beneficial.

@azygis azygis closed this Apr 15, 2024
@azygis azygis deleted the features/278-cache-queries branch April 15, 2024 09:30
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

Successfully merging this pull request may close these issues.

Optimisation of SQL generation logic
2 participants