-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Feat/support load balance and easy days in rescheduling #3815
base: main
Are you sure you want to change the base?
Feat/support load balance and easy days in rescheduling #3815
Conversation
this feels like a setup for future sadness, how bad was the perf hit that made this the preferable choice? At the very least, I'd say move everything that is common to both into their own functions so the logic will be consistent across them both. this will also make it easier to see the ways in which these differ, like I can tell they are sliiightly different but its hard to determine where without also pulling up the other code, if all common logic is in the same spot it'll be clear what the differences are. |
This function is I/O bound: anki/rslib/src/scheduler/states/load_balancer.rs Lines 120 to 128 in 038d85b
For rescheduling, the |
For future maintenance, we definitely want as much code shared between the paths as possible - whether that's by reusing old code and doing things like mutating an existing context for each card instead of creating a new one (which may not be practical here), or by introducing this new code and having the old code use it. |
Does this change respect the |
It does now.
I'm reusing some code snippet now. |
It supports load balance and easy days natively in rescheduling. For the sake of performance, I didn't reuse the
LoadBalancer
andLoadBalancerContext
.Preview:
25.02:
The PR:
The PR with easy days: