Merge lp:~michael.nelson/launchpad/982938-dont-load-all-tokens-for-all-ppas-into-memory into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Aaron Bentley on 2012-05-30 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 15335 | ||||
| Proposed branch: | lp:~michael.nelson/launchpad/982938-dont-load-all-tokens-for-all-ppas-into-memory | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
137 lines (+13/-36) 4 files modified
lib/lp/archivepublisher/htaccess.py (+6/-4) lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py (+4/-27) lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py (+1/-1) lib/lp/archivepublisher/tests/test_htaccess.py (+2/-4) |
||||
| To merge this branch: | bzr merge lp:~michael.nelson/launchpad/982938-dont-load-all-tokens-for-all-ppas-into-memory | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | 2012-05-30 | Approve on 2012-05-30 | |
|
Review via email:
|
|||
Commit Message
Don't load all tokens for all affected apps into memory when updating htpasswd.
Description of the Change
Summary
=======
This branch aims to reduce the load/memory consumption on germanium while generating htpasswd files.
Proposed fix
============
Use a generator to return a storm result set of tokens for each PPA, rather than
loading all tokens for all PPAs into a dict.
It will result in a larger query count. jml is working on a script that will generate data to be able to verify whether this branch does indeed help.
Pre-implementation notes
=======
Referring to https:/
12:27 < noodles> jml: if you think the first of those points (in my comment) is very likely to be causing performance issues, I could start coding that straight away...
12:27 < noodles> (given the numbers achuni mentioned above, it would seem likely, but only the measurements will tell).
12:27 < jml> as you say, only measurements will tell :)
12:28 < jml> noodles: I reckon code it up straight away. :)
Implementation details
=======
Sheesh - this is the quick cover letter? :P
LOC Rationale
=============
Yay - 12 lines of credit.
Tests
=====
./bin/test -vvct TestPPAHtaccess
./bin/test -vvct TestHtpasswdGen
Demo and Q/A
============
If this script runs on staging, we could QA by comparing output before and after running it.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/

A nice simplification!