Merge lp:~vorlon/ubuntu-archive-tools/queue-item-scaling into lp:ubuntu-archive-tools
| Status: | Merged |
|---|---|
| Merged at revision: | 568 |
| Proposed branch: | lp:~vorlon/ubuntu-archive-tools/queue-item-scaling |
| Merge into: | lp:ubuntu-archive-tools |
| Diff against target: |
39 lines (+5/-4) 1 file modified
queue (+5/-4) |
| To merge this branch: | bzr merge lp:~vorlon/ubuntu-archive-tools/queue-item-scaling |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Colin Watson | 2012-08-03 | Approve on 2012-08-04 | |
|
Review via email:
|
|||
Description of the Change
"if not item in list [...] list.append(item)" doesn't scale so good. Use a
set instead so the queue command will scale to handling the 800+ matches for
'queue accept language-pack'.
| Colin Watson (cjwatson) wrote : | # |
| Steve Langasek (vorlon) wrote : | # |
On Fri, Aug 03, 2012 at 07:13:19PM -0000, Colin Watson wrote:
> I think this will break ordering in 'queue info'.
Confirmed.
> How about using collections.
> documentation has a link to a recipe for OrderedSet.)
Looks like this works without too much trouble. I don't see any easy way to
test the performance currently, now that the language packs have been
flushed from the queue, but it at least seems to be working reliably.
Pushed an update.
- 566. By Steve Langasek on 2012-08-03
-
use collections.
OrderedDict( ) instead of a set, so we can still display items in the queue in order

I think this will break ordering in 'queue info'. How about using OrderedDict instead? (Or the collections documentation has
collections.
a link to a recipe for OrderedSet.)