Commit graph

17 commits

Author SHA1 Message Date
Damien Elmes
ad743d850d start work on scheduling refactor
Previously we used getCard() to fetch a card at the time. This required a
number of indices to perform efficiently, and the indices were expensive in
terms of disk space and time required to keep them up to date. Instead we now
gather a bunch of cards at once.

- Drop checkDue()/isDue so writes are not necessary to the DB when checking
for due cards
- Due counts checked on deck load, and only updated once a day or at the end
of a session. This prevents cards from expiring during reviews, leading to
confusing undo behaviour and due counts that go up instead of down as you
review. The default will be to only expire cards once a day, which represents
a change from the way things were done previously.
- Set deck var defaults on deck load/create instead of upgrade, which should
fix upgrade issues
- The scheduling code can now have bits and pieces switched out, which should
make review early / cram etc easier to integrate
- Cards with priority <= 0 now have their type incremented by three, so we can
get access to schedulable cards with a single column.
- rebuildQueue() -> reset()
- refresh() -> refreshSession()
- Views and many of the indices on the cards table are now obsolete and will
  be removed in the future. I won't remove them straight away, so as to not
  break backward compatibility.
- Use bigger intervals between successive card templates, as the previous
intervals were too small to represent in doubles in some circumstances

Still to do:

- review early
- learn more
- failing mature cards where delay1 > delay0
2010-10-18 14:35:11 +09:00
Damien Elmes
593a1e75b0 update unit test for new sync behaviour 2010-08-19 11:32:00 +09:00
Damien Elmes
60c76c93ff don't backup in unit tests 2010-02-20 10:03:47 +09:00
Damien Elmes
3d81181323 bulk media support -> local media copy, always send media table 2009-06-19 11:50:31 +09:00
Damien Elmes
2d32e1aaa1 strip all chinese/japanese support out in favour of plugins 2009-06-10 22:58:28 +09:00
Damien Elmes
05ad863e18 remove print statement from tests 2009-06-06 01:12:26 +09:00
Damien Elmes
8a19bd4c57 implement full sync uploading 2009-05-31 01:23:31 +09:00
Damien Elmes
df0e4d2446 ensure tags are synced properly in one way sync 2009-05-21 02:11:33 +09:00
Damien Elmes
c7f9cec657 add deck vars 2009-04-07 11:55:08 +09:00
Damien Elmes
af176921df fix reviewHistory unit test 2009-03-15 02:12:14 +09:00
Damien Elmes
8c9f883e68 dupe fact on add to avoid session issues 2008-12-07 11:38:35 +09:00
Damien Elmes
cdd2be3548 fix unit test, badstatusline error 2008-11-14 14:03:47 +09:00
Damien Elmes
b2d0e5d3df wip 2008-11-07 18:44:49 +09:00
Damien Elmes
e25feed0af support 4am rollover 2008-10-12 04:02:33 +09:00
Damien Elmes
e69522f120 ensure order of received cards 2008-10-06 18:41:50 +09:00
Damien Elmes
472eb4581a public decks wip 2008-10-04 14:48:23 +09:00
Damien Elmes
5da3a0f5d3 initial commit from hg 2008-09-27 23:50:03 +09:00