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

perf: cache site config for ~5 minutes #26341

Closed
wants to merge 1 commit into from

Conversation

ankush
Copy link
Member

@ankush ankush commented May 6, 2024

* Possibly Breaking *

On typical requests like get_list just computing site config takes 4%
of time. This is mostly 2 open calls and 2 json.loads calls.

This allows realtime config updates but who really needs this? Most web
services I know read config once at startup and never again. They either
ask you to restart or have reload signal for reloading configuration.

Caching 5 minutes is middle ground between old behaviour and some perf
benefits.

* Possibly Breaking *

On typical requests like `get_list` just computing site config takes 4%
of time. This is mostly 2 `open` calls and 2 `json.loads` calls.

This allows realtime config updates but who really needs this? Most web
services I know read config once at startup and never again.

Caching 5 minutes is middle ground between old behaviour and some perf
benefits.
@ankush ankush requested a review from a team as a code owner May 6, 2024 13:06
@ankush ankush requested review from akhilnarang and removed request for a team May 6, 2024 13:06
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label May 6, 2024
@akhilnarang
Copy link
Member

This is failing, can just wipe site config cache when set-config is called?

@ankush
Copy link
Member Author

ankush commented May 7, 2024

@akhilnarang yeah that works for single process only.

Figuring out some way to signal all running processes to reload their cached site configs 😄

@akhilnarang
Copy link
Member

@akhilnarang yeah that works for single process only.

Figuring out some way to signal all running processes to reload their cached site configs 😄

Ah yeah was only thinking about redis🙈

Copy link

stale bot commented May 22, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label May 22, 2024
@stale stale bot closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-test-cases Add test case to validate fix or enhancement dont-merge inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants