Merge lp:~ev/apport/973494 into lp:apport
| Status: | Merged |
|---|---|
| Merged at revision: | 2272 |
| Proposed branch: | lp:~ev/apport/973494 |
| Merge into: | lp:apport |
| Diff against target: |
93 lines (+35/-17) 1 file modified
backends/packaging-apt-dpkg.py (+35/-17) |
| To merge this branch: | bzr merge lp:~ev/apport/973494 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pitt | 2012-04-10 | Approve on 2012-04-10 | |
|
Review via email:
|
|||
Description of the Change
We've found apport-retrace and the code that wraps it in the crash database to be a bottleneck (bug 973494). In trying to improve the speed in which we can retrace core files (which is currently about 3/min), I noticed that we're constructing a new apt.Cache twice with the same data and calling update() on it twice.
This branch fixes that, and provides the following speed improvement:
ubuntu@
-c' './with_changes'
v^v^v^v^
n mean sd min max cmd
50 29566.9ms 1206.3 27047.6 36682.3 apport-retrace _usr_bin_
50 23592.5ms 648.8 21846.0 26651.0 ./with_changes
based on these samples, suggested sample size is n>=5 to have a 1493.59ms confidence interval
I dropped the workaround for setting apt.Cache(
| Martin Pitt (pitti) wrote : | # |
+ self._sandbox_
+ if self._sandbox_
This looks a bit weird. I presume it is just a copy&paste error, I'll fix that, and also the documentation for the new _sandbox_cache. Thanks!


I should note that this doesn't need to go into 12.04. If you're happy with the change, I can build this out of a PPA.