Signature verification is too slow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
Fix Released
|
Medium
|
Unassigned | ||
simplestreams (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
When running against http://
This makes a uvtool sync virtually unusable on Xenial.
[Development Fix]
The culprit is the constant += of a string as it is read in. This is inefficient in Python as each += results in a new string that has to be allocated. Keeping the lines in a list and joining them at the end reduces the time to 0.127 seconds.
[Stable Fix]
No change cherry-pick of fix committed upstream.
[Test Case]
On a machine with reasonable connectivity, run: uvt-simplestrea
Expected result: takes a few seconds with minimal CPU use.
Actual result: takes more than five minutes with CPU pegged at 100%.
Scott also has a more direct test case here: http://
[Original Notes]
Merge proposal to follow. I'm filing this bug to track a Xenial SRU.
Related branches
- simplestreams-dev: Pending requested
-
Diff: 27 lines (+5/-4)1 file modifiedsimplestreams/util.py (+5/-4)
description: | updated |
Changed in simplestreams: | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
Changed in simplestreams (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in simplestreams (Ubuntu Xenial): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
This bug was fixed in the package simplestreams - 0.1.0~bzr430- 0ubuntu1
--------------- bzr430- 0ubuntu1) yakkety; urgency=medium
simplestreams (0.1.0~
* New upstream snapshot.
- set a default user agent (LP: #1578622)
- glance mirror: do not require that hypervisor_config be
present (LP: #1578624)
- Optimise read_signed method for better performance (LP: #1580534)
-- Scott Moser <email address hidden> Thu, 12 May 2016 12:55:30 -0400