launchpadlib is too slow to import

Bug #522963 reported by Martin Pool
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Fix Released
Undecided
Unassigned

Bug Description

jam reports that just importing launchpadlib takes 500ms; this is unreasonably slow.

using the profile_imports code from bzr may help debug this.

time python -c 'import launchpadlib'
python -c 'import launchpadlib' 0.00s user 0.01s system 48% cpu 0.021 total

so presumably the pain comes when you import one of the lower-level modules that actually does stuff.

Tags: performance
Revision history for this message
Leonard Richardson (leonardr) wrote :

I've cut the import time approximately in half. See https://dev.launchpad.net/Foundations/Webservice/Performance, "Remove lazr.restfulclient's dependency on lazr.restful".

Revision history for this message
Gary Poster (gary) wrote :

It would be nice to do better, but I believe the majority of this time is coming from pkg_resources, which isn't going away soon.

Changed in launchpadlib:
status: New → Triaged
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.