Anki/anki
Damien Elmes 667b89ecc5 support partial syncs of arbitrary size
The full sync threshold was a hack to ensure we synced the deck in a
memory-efficient way if there was a lot of data to send. The problem is that
it's not easy for the user to predict how many changes there are, and so it
might come as a surprise to them when a sync suddenly switches to a full sync.

In order to be able to send changes in chunks rather than all at once, some
changes had to be made:

- Clients now set usn=-1 when they modify an object, which allows us to
  distinguish between objects that have been modified on the server, and ones
  that have been modified on the client. If we don't do this, we would have to
  buffer the local changes in a temporary location before adding the server
  changes.
- Before a client sends the objects to the server, it changes the usn to
  maxUsn both in the payload and the local storage.
- We do deletions at the start
- To determine which card or fact is newer, we have to fetch the modification
  time of the local version. We do this in batches rather than try to load the
  entire list in memory.
2011-09-24 12:42:02 +09:00
..
importing add USNs 2011-09-13 21:10:21 +09:00
template add [] to cloze 2011-04-29 11:43:06 +09:00
__init__.py prevent people from shooting themselves in the foot 2011-04-28 09:31:48 +09:00
cards.py refactor learning 2011-09-23 10:29:49 +09:00
consts.py group scheduling refactor 2011-09-22 11:54:01 +09:00
cram.py group scheduling refactor 2011-09-22 11:54:01 +09:00
db.py check python version and locale on load 2011-04-28 09:24:03 +09:00
deck.py support partial syncs of arbitrary size 2011-09-24 12:42:02 +09:00
errors.py support partial syncs of arbitrary size 2011-09-24 12:42:02 +09:00
exporting.py update license link 2011-04-28 09:24:01 +09:00
facts.py add guid and flags to facts 2011-09-18 04:31:53 +09:00
find.py add USNs 2011-09-13 21:10:21 +09:00
groups.py refactor learning 2011-09-23 10:29:49 +09:00
hooks.py update license link 2011-04-28 09:24:01 +09:00
js.py add a pie graph, add average interval to ivls area 2011-04-28 09:24:00 +09:00
lang.py update license link 2011-04-28 09:24:01 +09:00
latex.py simplify media.py 2011-09-11 00:25:22 +09:00
media.py move db 2011-09-12 05:03:31 +09:00
models.py more group/sched refactoring 2011-09-23 08:19:22 +09:00
sched.py ensure we give correct intervals for new cards 2011-09-23 14:55:20 +09:00
sound.py centralize all tmp dir access 2011-04-28 09:24:03 +09:00
stats.py group scheduling refactor 2011-09-22 11:54:01 +09:00
stdmodels.py move models into the deck table 2011-08-27 22:27:09 +09:00
storage.py support partial syncs of arbitrary size 2011-09-24 12:42:02 +09:00
sync.py support partial syncs of arbitrary size 2011-09-24 12:42:02 +09:00
tags.py support partial syncs of arbitrary size 2011-09-24 12:42:02 +09:00
utils.py add guid and flags to facts 2011-09-18 04:31:53 +09:00