##// END OF EJS Templates
drastic speed improvment in feed generation (was using old method)
marcink -
r507:f420e86d default
parent child Browse files
Show More
@@ -24,7 +24,7 b' feed controller for pylons'
24 24 """
25 25 from pylons import tmpl_context as c, url, response
26 26 from pylons_app.lib.base import BaseController, render
27 from pylons_app.model.hg_model import _full_changelog_cached
27 from pylons_app.model.hg_model import HgModel
28 28 from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed
29 29 import logging
30 30 log = logging.getLogger(__name__)
@@ -49,10 +49,9 b' class FeedController(BaseController):'
49 49 language=self.language,
50 50 ttl=self.ttl)
51 51
52
53 for cnt, cs in enumerate(_full_changelog_cached(repo_name)):
54 if cnt > self.feed_nr:
55 break
52 changesets = HgModel().get_repo(repo_name)
53
54 for cs in changesets[:self.feed_nr]:
56 55 feed.add_item(title=cs.message,
57 56 link=url('changeset_home', repo_name=repo_name,
58 57 revision=cs.raw_id, qualified=True),
@@ -70,11 +69,11 b' class FeedController(BaseController):'
70 69 language=self.language,
71 70 ttl=self.ttl)
72 71
73 for cnt, cs in enumerate(_full_changelog_cached(repo_name)):
74 if cnt > self.feed_nr:
75 break
72 changesets = HgModel().get_repo(repo_name)
73 for cs in changesets[:self.feed_nr]:
76 74 feed.add_item(title=cs.message,
77 link=url('changeset_home', repo_name=repo_name, revision=cs.raw_id, qualified=True),
75 link=url('changeset_home', repo_name=repo_name,
76 revision=cs.raw_id, qualified=True),
78 77 description=str(cs.date))
79 78
80 79 response.content_type = feed.mime_type
General Comments 0
You need to be logged in to leave comments. Login now