Commit graph

568 commits

Author SHA1 Message Date
Damien Elmes
72a1cd73a9 move upgrade code into separate file 2011-04-28 09:21:06 +09:00
Damien Elmes
4302306fe9 use a checksum for field values; fixed import->update number
Previously we had an index on the value field, which was very expensive for
long fields. Instead we use a separate column and take the first 8 characters
of the field value's md5sum, and index that. In decks with lots of text in
fields, it can cut the deck size by 30% or more, and many decks improve by
10-20%. Decks with only a few characters in fields may increase in size
slightly, but this is offset by the fact that we only generate a checksum for
fields that have uniqueness checking on.

Also, fixed import->update reporting the total # of available facts instead of
the number of facts that were imported.
2011-04-28 09:21:06 +09:00
Damien Elmes
feadce76f3 delete tombstones in integrity check as we can guarantee a full sync; optimize 2011-04-28 09:21:06 +09:00
Damien Elmes
1ddf1be747 abort the summary early if we're over the full sync threshold 2011-04-28 09:21:06 +09:00
Damien Elmes
d23a2bbe59 remove old alter table statements from long ago 2011-04-28 09:21:06 +09:00
Damien Elmes
a45dac36c4 remove some duplicate code in the upgrades 2011-04-28 09:21:06 +09:00
Damien Elmes
1a3c8c0c1e remove views and pre 0.9.9.8.6 upgrade code; upgrade test decks to 0.9.9.8.6 2011-04-28 09:21:06 +09:00
Damien Elmes
28604b9d29 remove priorities 2011-04-28 09:21:06 +09:00
Damien Elmes
73d83bc640 fixIntegrity() tweaks
- fix card ordinals too
- don't change modification time on cards, facts or models
- mark schema modified to force full sync
2011-04-28 09:21:06 +09:00
Damien Elmes
7c2b202163 timestamp schema changes 2011-04-28 09:21:06 +09:00
Damien Elmes
19a293cf74 don't return a negative delay for failed cards 2011-02-24 13:20:19 +09:00
Damien Elmes
008c5904ca when calculating delay, compare against cutoff, not current time 2011-02-20 13:45:45 +09:00
Damien Elmes
f156f81a84 don't add a mature bonus when cramming 2011-02-09 00:36:16 +09:00
Damien Elmes
8828027729 when calculating next interval ensure we don't have a negative delay 2011-02-09 00:23:45 +09:00
Damien Elmes
8a1df1728f rebuildTypes()
- ensure we're fixing relativeDelay for suspended cards
- remove priority compat code
2011-02-08 02:46:07 +09:00
Damien Elmes
ff38dad5b2 remove redundant code 2011-02-04 20:33:13 +09:00
Damien Elmes
340b5864c8 when deck is finished stop timeboxing timer 2011-02-03 00:18:42 +09:00
Damien Elmes
1464394d58 when the day rolls over, update due cutoffs too, and rebuild queue 2011-02-02 23:52:34 +09:00
Damien Elmes
e49a9bb5ac relative sibling spacing for reviews
Anki 1.0 had a similar feature but we do things a bit differently now. The
relative spacing applies only to reviews, and spaces cards according to their
interval, instead of spacing all cards the same. Any delay < 1 full day is
treated as no delay, so with the default 10% setting, reviews with an interval
< 10 days are not spaced at all. This should hopefully cut down on support
queries for people wondering why many of their cards were delayed, allows the
two settings to be documented separately, and does away with the somewhat
confusing usage of non-integer new sibling values to disable review spacing.
2011-02-02 23:47:58 +09:00
Damien Elmes
66e44f494b don't update factor in cram, learn more, etc 2011-02-02 22:12:06 +09:00
Damien Elmes
338838583e more last interval preservation into cram scheduler code 2011-02-02 22:10:44 +09:00
Damien Elmes
e0d5b9d69e never set lastSync=0 when toggling syncing
we should rely on needFullSync() to determine whether a full sync is actually
necessary.
2011-01-30 15:31:29 +09:00
Damien Elmes
d362decca2 Merge https://github.com/ymasory/libanki 2011-01-30 12:46:13 +09:00
Yuvi Masory
b0b9cd2ce3 suppress indentation 2011-01-29 22:40:29 -05:00
Damien Elmes
ab9451253c now all clients are updated, set delay1 = 0 if 600 2011-01-29 11:01:43 +09:00
Damien Elmes
523adc468e allow user to disable review spacing 2011-01-27 07:45:45 +09:00
Damien Elmes
942307190e catch duplicate tags in upgrade 2011-01-26 15:04:32 +09:00
Damien Elmes
ed5a8b0e3e make sure created is reset 2011-01-26 14:36:45 +09:00
Damien Elmes
be3f32755e new option for tz reset without unpack 2011-01-26 14:32:53 +09:00
Damien Elmes
b533c99375 typo in upgrade code 2011-01-24 09:07:47 +09:00
Damien Elmes
e042ef5e62 make the format upgrading smarter 2011-01-22 07:36:05 +09:00
Damien Elmes
6860bba0de ensure failed mature come at the start of the future day
- this fixes a state where cards failed on that future day could end up
  with an earlier due date that the rest of the failed mature cards, leading
  to the newly failed cards being repeated prematurely
- this leads to non-deterministic scheduling of the mature bonus fails, so
  they are effectively randomized which is probably what most users want
2011-01-21 09:36:04 +09:00
Damien Elmes
4859778d2c preserve old default card-level formatting 2011-01-21 06:41:34 +09:00
Damien Elmes
f945e60d6d when renaming fields, look for the non-space version instead 2011-01-19 05:17:39 +09:00
Damien Elmes
bd7f5787cc fix a bug with relativeDelay not being set on card answer 2011-01-19 01:18:27 +09:00
Damien Elmes
98fb0f5bb9 apply selective study to review early 2011-01-17 01:36:19 +09:00
Damien Elmes
3d5a427f85 fix include&exclude tags case 2011-01-14 23:08:09 +09:00
Damien Elmes
276ec634b9 ignore new cards in hiddenCards() 2011-01-14 19:03:02 +09:00
Damien Elmes
149fbee33e fix new-style template replacement; support cond rendering 2011-01-13 20:00:35 +09:00
Damien Elmes
9b7a55d964 remove some old indices 2011-01-13 19:21:40 +09:00
Damien Elmes
bef86bdbf3 make sure default font sizes are set on upgrade 2011-01-13 06:21:23 +09:00
Damien Elmes
fdd88080c8 work around ankidroid getbool bug 2011-01-13 05:25:05 +09:00
Damien Elmes
3f5befc2e7 don't alter lastSync on upgrade 2011-01-13 04:20:37 +09:00
Damien Elmes
46a441fc0b remove obsolete bulk fetching 2011-01-10 19:26:43 +09:00
Damien Elmes
9af5d4d5ed apply limit to new card count 2011-01-10 18:58:59 +09:00
Damien Elmes
87ffbedf16 remove unused clause in earliestTime() 2011-01-09 15:23:09 +09:00
Damien Elmes
2ca1627add use cardLimit() in cardsDueBy(), not just earliestTime() 2011-01-09 15:13:33 +09:00
Damien Elmes
a4df210667 add group_concat compat code from wm port 2011-01-02 22:17:34 +09:00
Damien Elmes
b235461d8b space cards to next session if per-day off 2011-01-02 17:43:53 +09:00
Damien Elmes
329ab99ff7 add seen card count back for plugins 2011-01-02 13:05:18 +09:00