optimize change model - much faster for large decks

This commit is contained in:
Damien Elmes 2009-05-16 03:14:23 +09:00
parent 2a9e88cb5d
commit 6ccafcb996

View file

@ -1316,9 +1316,12 @@ where id in %s""" % ids2str(ids), new=new.id, ord=new.ordinal)
self.updateCardQACacheFromIds(factIds, type="facts")
self.flushMod()
self.updateProgress()
self.updateCardTags()
cardIds = self.s.column0(
"select id from cards where factId in %s" %
ids2str(factIds))
self.updateCardTags(cardIds)
self.updateProgress()
self.updateAllPriorities()
self.updatePriorities(cardIds)
self.updateProgress()
self.rebuildCounts()
self.refresh()