Comment 6 for bug 397739

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 397739] Re: LaunchpadDirectory shouldn't use xmlrpc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> At this point, we have plugins that use the API, and the API supports
> anonymous access. So it's certainly possible, but it's hard to imagine
> disabling the xmlrpc option for those without API support.
>

Right. Not to mention that my experiments don't instill me with
confidence that going via the API will be any faster/provide a better
user experience.

Using 'timeit' to load all plugins right now:
$ TIMEIT "call([sys.executable, '-c', 'import bzrlib.plugin; \
                bzrlib.plugin.load_plugins()'])"
10 loops, best of 3: 496 msec per loop

Adding an import of the launchpad api:
$ TIMEIT "call([sys.executable, '-c', 'import bzrlib.plugin; \
 bzrlib.plugin.load_plugins();\
 from bzrlib.plugins.launchpad import lp_api])"
10 loops, best of 3: 1.04 sec per loop

Which is 500ms of overhead to load lp_api. On a Linux virtual guest,
things are a little bit better:
268ms baseline, 384ms import lp_api.

Though also that machine doesn't have as many plugins or search paths
installed.

It is still a rather significant overhead, though I suppose comparable
to an http round trip. So if lp_api could save us a few round trips to
resolve the lp: url, it could be a net win. (500ms is a lot, though.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt0RN4ACgkQJdeBCYSNAAP4NQCfeSQuyMTctFilHRIMtUnnpv21
M9MAoMUukpMaQkyEi2tuI0MIe/ScWOIR
=nu3O
-----END PGP SIGNATURE-----