||<>|| = time based comparison of python-launchpad-bugs and launchpadlib = This is still work in progress. python's timeit is used. == Preparation == === launchpadlib === There are two files with credentials for ''STAGING'' and ''EDGE'', for each mode the connector is created by {{{ >>> credentials = Credentials() >>> credentials.load(open()) >>> launchpad = Launchpad(credentials, ) }}} === python-launchpad-bugs (text) === (read-only access) {{{ >>> Bug = ConnectBug("text") >>> Bug.set_connection_mode() }}} === python-launchpad-bugs (html) === (this connection mode is used for write-access) {{{ >>> Bug = ConnectBug("html") >>> Bug.authentication = >>> Bug.set_connection_mode() }}} == Results == === 20080809 === ==== Versions ==== '''launchpadlib:''' lp:launchpadlib (rev8) '''python-launchpad-bugs:''' lp:python-launchpad-bugs (rev152) ==== Results ==== || '''Task''' || '''Lib''' || '''Code''' || '''STAGING''' || '''EDGE''' || || '''get description of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print b.description }}}|| 10 loops, best of 3: 2.09 s per loop <
> 25 loops, best of 3: 2.1 s per loop || 10 loops, best of 3: 2.65 s per loop <
> 25 loops, best of 3: 2.47 s per loop || || ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print b.description }}} || 10 loops, best of 3: 638 ms per loop <
> 25 loops, best of 3: 641 ms per loop|| 10 loops, best of 3: 808 ms per loop <
> 25 loops, best of 3: 762 ms per loop || || '''get status of all tasks of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print [t.status for t in b.bug_tasks] }}}|| 10 loops, best of 3: 2.23 s per loop <
> 25 loops, best of 3: 2.28 s per loop || 10 loops, best of 3: 2.86 s per loop <
> 25 loops, best of 3: 2.69 s per loop || || ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print [t.status for t in b.infotable] }}} || 10 loops, best of 3: 641 ms per loop <
> 25 loops, best of 3: 639 ms per loop || 10 loops, best of 3: 756 ms per loop <
> 25 loops, best of 3: 751 ms per loop || || '''change status of first task of #255634''' || ''py-lp-bugs (html)'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = Bug(255634) }}} <
> {{{ >>> task = b.infotable[0] }}} <
> {{{ >>> task.status = status_map[task.status] }}} <
> {{{ >>> b.commit() }}} || <
> || 10 loops, best of 3: 6.83 s per loop <
> 25 loops, best of 3: 6.33 s per loop || || ''launchpadlib'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = launchpad.bugs[255634] }}} <
> {{{ >>> task = list(b.bug_tasks)[0] }}} <
> {{{ >>> task.transitionToStatus(status=status_map[task.status]) }}} || <
> || 10 loops, best of 3: 3.66 s per loop <
> 25 loops, best of 3: 4.51 s per loop || ==== Conclusion ==== * for read-only access python-launchpad-bugs in the ''text'' mode is about three times faster than launchpadlib * write-access with launchpadlib is two times faster than python-launchpad-bugs in the ''html'' mode === 20080821 === ==== Versions ==== '''launchpadlib:''' lp:launchpadlib (rev13) '''wadllib:''' lp:wadllib (rev6) '''python-launchpad-bugs:''' lp:python-launchpad-bugs (rev152) ==== Results ==== || '''Task''' || '''Lib''' || '''Code''' || '''STAGING''' || '''EDGE''' || || '''get description of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print b.description }}}|| || 10 loops, best of 3: 189 ms per loop <
> 25 loops, best of 3: 197 ms per loop || ||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print b.description }}} || || || || '''get status of all tasks of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print [t.status for t in b.bug_tasks] }}}|| || || ||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print [t.status for t in b.infotable] }}} || || || || '''change status of first task of #255634''' || ''py-lp-bugs (html)'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = Bug(255634) }}} <
> {{{ >>> task = b.infotable[0] }}} <
> {{{ >>> task.status = status_map[task.status] }}} <
> {{{ >>> b.commit() }}} || <
> || || ||''launchpadlib'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = launchpad.bugs[255634] }}} <
> {{{ >>> task = list(b.bug_tasks)[0] }}} <
> {{{ >>> task.transitionToStatus(status=status_map[task.status]) }}} || <
> || || ==== Conclusion ==== * I'm not able to get time-stable results from staging, will try it later again === 20090109 === ==== Versions ==== '''launchpadlib:''' lp:launchpadlib (rev29) '''wadllib:''' lp:wadllib (rev6) '''python-launchpad-bugs:''' lp:python-launchpad-bugs (rev171) ==== Preparations ==== The timings for launchpadlib are now part of the launchpad profile for ipython. To run this timings get the code from `lp:~thekorn/+junk/ipython.launchpad.profile`, copy the profile to `~/.ipython` and run: {{{ % LPTIMING=1 ipython -p launchpad #for staging, or % LPMODE=edge LPTIMING=1 ipython -p launchpad #for edge }}} ==== Results ==== || '''Task''' || '''Lib''' || '''Code''' || '''STAGING''' || '''EDGE''' || || '''get description of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print b.description }}}|| 10 loops, best of 3: 2.36 s per loop <
> 25 loops, best of 3: 1.4 s per loop || 10 loops, best of 3: 136 ms per loop <
> 25 loops, best of 3: 135 ms per loop || ||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print b.description }}} || || || || '''get status of all tasks of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <
> {{{ >>> print [t.status for t in b.bug_tasks] }}} || 10 loops, best of 3: 3.69 s per loop <
> 25 loops, best of 3: 4.27 s per loop || 10 loops, best of 3: 306 ms per loop <
> 25 loops, best of 3: 313 ms per loop || ||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <
> {{{ >>> print [t.status for t in b.infotable] }}} || || || || '''change status of first task of #255634''' || ''py-lp-bugs (html)'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = Bug(255634) }}} <
> {{{ >>> task = b.infotable[0] }}} <
> {{{ >>> task.status = status_map[task.status] }}} <
> {{{ >>> b.commit() }}} || <
> || || || ''launchpadlib'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <
> {{{ >>> b = launchpad.bugs[255634] }}} <
> {{{ >>> task = list(b.bug_tasks)[0] }}} <
> {{{ >>> task.transitionToStatus(status=status_map[task.status]) }}} || 10 loops, best of 3: 10.2 s per loop <
> 25 loops, best of 3: 7.04 s per loop || 10 loops, best of 3: 1.16 s per loop <
> 25 loops, best of 3: 1.24 s per loop || ==== Conclusion ==== * edge is looking good, speed seems to be improved since I checked it the last time few month ago = Missing features in launchpadlib = This is a list of which can be done with python-launchpad-bugs but not with launchpadlib. ''(still work in progress)'' || '''Feature''' || '''LP Bug''' || '''Comment''' || || getting a list of users bugs || [[ http://launchpad.net/bugs/281443 | Bug 281443 ]] and [[ http://launchpad.net/bugs/282178 | Bug 282178 ]] || || || nominate a bug for a release || [[ http://launchpad.net/bugs/297458 | Bug 297458 ]] || || || setting bug privacy || [[ http://launchpad.net/bugs/308374 | Bug 308374 ]] || || || removing attachments || [[ http://launchpad.net/bugs/315387 | Bug 315387 ]] || || || API to /+storeblob || [[ http://launchpad.net/bugs/315358 | Bug 315358 ]] || || || changing target of tasks || [[ http://launchpad.net/bugs/309182 | Bug 309182 ]] || || || dates are strings, not datetime objects || [[ http://launchpad.net/bugs/309950 | Bug 309950 ]] || || || API for activitylog || [[ http://launchpad.net/bugs/237934 | Bug 237934 ]] || || || anonymous access || || || || search by date_ || || || || search for bugs w/o a tag || || || || Bug: can't get tasks for distro series || [[ http://launchpad.net/bugs/320596 | Bug 320596 ]] || || = Comments/Notes =