Mercurial > hg > Feedworm
changeset 192:9d422fa90096
optimize marking feed entries as read: do not round trip to the database if the entry was already marked as read
author | dirk |
---|---|
date | Wed, 21 Sep 2011 13:23:25 +0200 |
parents | 7157bfd3f4d4 |
children | c345a26febc2 |
files | backend/couchdb/FeedEntry.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/couchdb/FeedEntry.py Wed Sep 21 13:21:17 2011 +0200 +++ b/backend/couchdb/FeedEntry.py Wed Sep 21 13:23:25 2011 +0200 @@ -36,8 +36,9 @@ return list(viewResults) def markRead(self, database): - self.read = True - self.store(database) + if not self.read: + self.read = True + self.store(database) def toggleRead(self, database): if self.read: