Mercurial > public > sg101
comparison gpp/forums/feeds.py @ 396:63e4682d6482
Fixing grammar in a comment only.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 25 Mar 2011 00:39:17 +0000 |
parents | 9af6bd45c1f8 |
children | 248dd8dd67f8 |
comparison
equal
deleted
inserted
replaced
395:e10fa0d8e7ad | 396:63e4682d6482 |
---|---|
56 # return a combined feed of public forum threads | 56 # return a combined feed of public forum threads |
57 | 57 |
58 # This was tricky to do without suffering a large performance | 58 # This was tricky to do without suffering a large performance |
59 # impact. Because the number of forums is small, MySQL did not | 59 # impact. Because the number of forums is small, MySQL did not |
60 # try to use an index and ended up searching all the topics for | 60 # try to use an index and ended up searching all the topics for |
61 # candidate posts. We work around this first getting a small list | 61 # candidate posts. We work around this by first getting a small list |
62 # of candidate topics, and then searching them. This is more | 62 # of candidate topics, and then searching them. This is more |
63 # queries but a *lot* more time efficient. | 63 # queries but a *lot* more time efficient. |
64 | 64 |
65 forum_ids = Forum.objects.public_forum_ids() | 65 forum_ids = Forum.objects.public_forum_ids() |
66 topic_ids = list(Topic.objects.filter(forum__in=forum_ids).order_by( | 66 topic_ids = list(Topic.objects.filter(forum__in=forum_ids).order_by( |