Anki/rslib/src/storage
Jake Probst c6cb4e4373
load balancer! (#3230)
* start of load balancer

* add configuration options; option to load balance per deck

* formatting

* clippy

* add myself to contributors

* cleanup

* cargo fmt

* copyright header on load_balancer.rs

* remove extra space

* more formatting

* python formatting

* ignore this being None

only doing this cause python has awful lambdas and can't
loop in a meaningful way without doing this

* only calculate notes on each day if we are trying to avoid siblings

* don't fuzz intervals if the load balancer is enabled

* force generator to eval so this actually happens

* load balance instead of fuzzing, rather than in addition to

* use builtin fuzz_bounds rather than reinvent something new

* print some debug info on how its load balancing

* clippy

* more accurately load balance only when we want to fuzz

* incorrectly doublechecking the presence of the load balancer

* more printfs for debugging

* avoid siblings -> disperse siblings

* load balance learning graduating intervals

* load balancer: respect min/max intervals; graduating easy should be at least +1 good

* filter out after-days under minimum interval

* this is an inclusive check

* switch load balancer to caching instead of on the fly calculation

* handle case where load balancer would balance outside of its bounds

* disable lb when unselecting it in preferences

* call load_balancer in StateContext::with_review_fuzz instead of next to

* rebuild load balancer when card queue is rebuilt

* remove now-unused configuration options

* add note option to notetype to enable/disable sibling dispersion

* add options to exclude decks from load balancing

* theres a lint checking that the link actually exists so I guess I'll add the anchor back in later?

* how did I even update this

* move load balancer to cardqueue

* remove per-deck balancing options

* improve determining whether to disperse siblings when load balancing

* don't recalculate notes on days every time

* remove debug code

* remove all configuration; load balancer enabled by default; disperse siblings if bury_reviews is set

* didn't fully remove caring about decks from load balancer sql query

* load balancer should only count cards in the same preset

* fuzz interval if its outside of load balancer's range

* also check minimum when bailing out of load balancer

* cleanup; make tests happy

* experimental weight-based load balance fuzzing

* take into account interval when weighting as it seems to help

* if theres no cards the interval weight is just 1.0

* make load balancer disableable through debug console

* remove debug prints

* typo

* remove debugging print

* explain a bit how load balancer works

* properly balance per preset

* use inclusive range rather than +1

* -1 type cast

* move type hint somewhere less ugly; fix comment typo

* Reuse existing deck list from parent function (dae)

Minor optimisation
2024-08-17 12:50:54 +07:00
..
card load balancer! (#3230) 2024-08-17 12:50:54 +07:00
config Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
dbcheck Improve performance of invalid ID fix in DB check 2023-07-07 22:53:41 +10:00
deck Fix new cards from parent decks being gathered (#2907) 2023-12-24 20:04:28 +10:00
deckconfig Fix preset searches, and expose in text search 2023-09-17 12:51:22 +10:00
graves Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
note Do not clear unused parent tags (#3174) 2024-05-06 23:49:59 +10:00
notetype Fix error after notetype merge + downgrade 2024-01-12 15:16:27 +10:00
revlog ignore filtered revlog in time of last review (#2845) 2023-11-24 15:52:00 +10:00
tag Expose some collection methods already public in rslib backend (#2510) 2023-05-22 13:44:18 +10:00
upgrades Split io.rs into separate crate, and use it in proto build 2023-06-12 15:47:51 +10:00
collection_timestamps.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
mod.rs Make some more fields/methods public 2023-06-20 21:59:49 +10:00
schema11.sql Add comment explaining why sfld column has type integer 2021-01-25 18:39:59 +08:00
sqlite.rs Calculate elapsed days for intraday learning cards 2023-12-13 10:18:29 +10:00
sync.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
sync_check.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00