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

rsc: Precalcuate job size as part of cron job #1614

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

V-FEXrt
Copy link
Contributor

@V-FEXrt V-FEXrt commented Jul 31, 2024

Recalculating the job size every time it is needed is very expensive. This was less of an issue when only being used for dashboarding but the size is also needed for eventual LRU eviction. This PR sets up a cron task to calculate and store the size of the job after the job has been inserted so that the calculated value can be used directly

Copy link
Collaborator

@ag-eitilt ag-eitilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber stamp.

Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Glad to see the same should_sleep loop used again.

@V-FEXrt V-FEXrt merged commit 958299c into master Aug 1, 2024
11 checks passed
@V-FEXrt V-FEXrt deleted the rsc-calc-job-size branch August 1, 2024 00:06
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.

3 participants