-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Feat/support load balance and easy days in rescheduling #3815
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
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. |
|
In the latest commit, if the user changes the easy days setting and enable "reschedule cards on change", the rescheduling will be executed without modifying the desired retention or FSRS parameters. |
|
Thanks Jarrett, this should make a lot of people happy. As this is largely based on @jakeprobst's code, I'll defer to him on the final approval, but no issues from my end. One thought: it won't be obvious to users that reschedule on change affects easy days as it's in a different section. One optional improvement would be to display a yellow warning when easy days are changed and reschedule is off - something like: "Existing reviews will not be rescheduled unless '{ deck-config-reschedule-cards-on-change }' is enabled in the FSRS options." |
|
looks good to me! |
|
In the 51f43f5, I added this warning:
It works well with previous warning, too.
|
What if the user doesn't have FSRS enabled? IMO, this warning should be hidden in that case. |
|
Also somewhat related: |
My initial thought is this is probably really difficult to do, unfortunately |
I thought about it, but hiding it gives the user no clue that it's not retroactive in the SM2 case. |
|
Thanks everyone! |
|
Sorry, I try to remove my attribution when making such trivial changes, but I forgot again. :-( |


It supports load balance and easy days natively in rescheduling. For the sake of performance, I didn't reuse the
LoadBalancerandLoadBalancerContext.Preview:
25.02:
The PR:
The PR with easy days: