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/
-----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: sys.executable, '-c', 'import bzrlib.plugin; \
bzrlib. plugin. load_plugins( )'])"
$ TIMEIT "call([
10 loops, best of 3: 496 msec per loop
Adding an import of the launchpad api: sys.executable, '-c', 'import bzrlib.plugin; \ plugin. load_plugins( );\ plugins. launchpad import lp_api])"
$ TIMEIT "call([
bzrlib.
from bzrlib.
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 enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkt 0RN4ACgkQJdeBCY SNAAP4NQCfeSQuy MTctFilHRIMtUnn pv21 Ei2tuI0MIe/ ScWOIR
M9MAoMUukpMaQky
=nu3O
-----END PGP SIGNATURE-----