-
Notifications
You must be signed in to change notification settings - Fork 137
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: decrease scheduler checks from every 1 second to 10 seconds #409
perf: decrease scheduler checks from every 1 second to 10 seconds #409
Conversation
e45fec1
to
6eba10b
Compare
I've updated the PR to check if there are any more tasks and schedule for 10s if not. |
Stupid question: is this running forever? If so: why? Can't it be stoped once all tasks have been run (and restarted, if there every comes in a new task)? |
They run forever because it's ~5 lines of code every 1 second. That's very
low overhead. More, if load'' and unload'' ices been passed, then the
background schedule calls are needed to test them.
…On Thu, 3 Nov 2022 at 11:30, Jan Katins ***@***.***> wrote:
Stupid question: is this running forever? If so: why? Can't it be stoped
once all tasks have been run (and restarted, if there every comes in a new
task)?
—
Reply to this email directly, view it on GitHub
<#409 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOE4CA6R4HMXK3Z7COM7C3WGOO4XANCNFSM6AAAAAARV57JGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Best regards,
Sebastian Gniazdowski
|
6eba10b
to
ea67c6d
Compare
I've added short-circuit return if no tasks, so basically it's 1 line of code every 10 seconds if no tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
This breaks the |
🎉 This PR is included in version 3.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…harma-continuum#409) The scheduler is called in 10 seconds intervals when no tasks are present to lower CPU usage. Co-authored-by: vladislav doster <[email protected]>
…conds (zdharma-continuum#409)" This reverts commit 4938e84.
Description
Change the time interval for the scheduler to check for queued tasks to ten seconds.
Motivation and Context
Lower system resource usage.
Related Issue(s)
#362
How Has This Been Tested?
Types of change
Checklist: