[pygtk] odd performance discrepancy between gtk.ListStore.insert() and gtk.ListStore.append()

Lawrence Oluyede l.oluyede at gmail.com
Thu Mar 2 05:57:53 WST 2006


On 3/1/06, Jason Gerard DeRose <jderose at jasonderose.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Haha... in my email I discovered an odd grammatical discrepancies.
> That's what I get for posting this early.  ;)
>
> In my work on FUPlayer, I discovered an odd performance discrepancy
> between gtk.ListStore.insert() and gtk.ListStore.append(), namely that
> insert() is significantly faster than append().
>
> In my benchmarks, run under Ubuntu Breezy (pygtk 2.8.1, gtk 2.8.6),
> populating a ListStore using insert() ran in 77% the time of append().
> To me this suggests a bug in pygtk or gtk.
>
> I have attached small script demonstrating this.



On my Ubuntu machine are pretty equal:

rhymes at voodoo:~ $ python insert_vs_append.py
liststore_insert = 0.433752
liststore_append = 0.529229
liststore_insert / liststore_append = 0.819593

pygtk is 2.8.4 and gtk 2.8.13

--
Lawrence
http://www.oluyede.org/blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20060301/5fd1da30/attachment-0001.htm


More information about the pygtk mailing list