From cae5acc17d9dd328662eb7788510b8d0a2a1e743 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 12 Nov 2008 18:32:38 +0000 Subject: [PATCH] Use a frozenset to optimize skiplist containment checks inside NewsManager.updateItems(). svn path=/main/trunk/; revision=11862 --- pym/portage/news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/news.py b/pym/portage/news.py index e366287bb..9d51d8baf 100644 --- a/pym/portage/news.py +++ b/pym/portage/news.py @@ -77,7 +77,7 @@ class NewsManager(object): news = os.listdir(path) skipfile = os.path.join(self.unread_path, "news-%s.skip" % repoid) - skiplist = grabfile(skipfile) + skiplist = frozenset(grabfile(skipfile)) updates = [] for itemid in news: if itemid in skiplist: -- 2.26.2