mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
optimize for large number of new cards
This commit is contained in:
parent
3d026bb882
commit
e066ea3681
1 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ where isDue = 0 and priority in (1,2,3,4) and combinedDue < :now""",
|
|||
"Update relative delays for expired cards."
|
||||
self.s.statement("""update cards
|
||||
set relativeDelay = interval / (strftime("%s", "now") - due + 1)
|
||||
where isDue = 1""")
|
||||
where isDue = 1 and type = 1""")
|
||||
|
||||
def rebuildQueue(self, updateRelative=True):
|
||||
"Update relative delays based on current time."
|
||||
|
@ -322,7 +322,7 @@ where isDue = 1""")
|
|||
self.newCardModulus = 0
|
||||
# determine starting factor for new cards
|
||||
self.averageFactor = (self.s.scalar(
|
||||
"select avg(factor) from cards where reps > 0")
|
||||
"select avg(factor) from cards where type = 1")
|
||||
or Deck.initialFactor)
|
||||
|
||||
def checkDailyStats(self):
|
||||
|
|
Loading…
Reference in a new issue