the python apport hook slows down startup time of the python interpreter by 50%
Bug #1307684 reported by
Matthias Klose
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
the python apport hook slows down startup time of the python interpreter by 50%. This is caused by always importing the re and the glob modules (and depending modules). Now moving the import into the functions.
As a future optimization, maybe don't use the re module at all in enabled().
Found by investigating a failing test in the python3 testsuite.
Changed in apport (Ubuntu): | |
status: | New → Fix Committed |
To post a comment you must log in.
Thanks Matthias for finding this, that's a nice optimization!
I rejected your upload as it introduces a regression, spotted by pyflakes:
./apport_ python_ hook.py: 159: undefined name 're'
I fixed that and applied it to trunk:
http:// bazaar. launchpad. net/~apport- hackers/ apport/ trunk/revision/ 2787