From f6477cfceeb7fa9400ba76a0c9f22c7703c2d7a5 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Thu, 4 Nov 2010 22:24:05 +0100 Subject: Improvement of the performance (concerning the load of articles from data base in memory). --- pyAggr3g470r.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index e8525526..be2e796c 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -1095,7 +1095,10 @@ class Root: with the database. Called when a changes in the database is detected. """ - self.articles, self.feeds = utils.load_feed() + self.articles, self.feeds, \ + self.nb_articles, self.nb_unread_articles, \ + self.nb_favorites, self.nb_mail_notifications = utils.load_feed() + """ self.nb_articles = sum([feed[0] for feed in self.feeds.values()]) self.nb_unread_articles = sum([feed[1] for feed in self.feeds.values()]) self.nb_mail_notifications = len([feed for feed in self.feeds.values() \ @@ -1103,6 +1106,7 @@ class Root: self.nb_favorites = sum([len([article for article in self.articles[feed_id] \ if article[7] == "1"]) \ for feed_id in self.feeds.keys()]) + """ if self.articles != {}: print "Base (%s) loaded" % utils.sqlite_base else: -- cgit