From d2ac7fc13e5acbb89470ce8fb26f09494a02be67 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 11 Jun 2009 03:49:16 +0900 Subject: [PATCH] don't dirty cards/fact on full check, rely on lastSync = 0 --- anki/deck.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index 5cb0e315b..122242735 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -2299,7 +2299,7 @@ select id from fields where factId not in (select id from facts)""") self.updateCardTags() # fix any priorities self.updateProgress(_("Updating priorities...")) - self.updateAllPriorities() + self.updateAllPriorities(dirty=False) # fix problems with stripping html self.updateProgress(_("Rebuilding QA cache...")) fields = self.s.all("select id, value from fields") @@ -2311,12 +2311,8 @@ select id from fields where factId not in (select id from facts)""") newFields) # regenerate question/answer cache for m in self.models: - self.updateCardsFromModel(m) - # mark everything changed to force sync - self.s.flush() - self.s.statement("update cards set modified = :t", t=time.time()) - self.s.statement("update facts set modified = :t", t=time.time()) - self.s.statement("update models set modified = :t", t=time.time()) + self.updateCardsFromModel(m, dirty=False) + # force a full sync self.lastSync = 0 # rebuild self.updateProgress(_("Rebuilding types..."))