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

Jason Gerard DeRose jderose at jasonderose.org
Wed Mar 1 21:24:12 WST 2006


-----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.

Cheers!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBRAWgfHqoeC9LR4KXAQL8qwf9Hrut7zRGgzJSgQq5zcwmE+w56DQIRH7B
0MoOu+1mARRHpH9R61cd5UGgR8rJQ0xkkk9B7S0ebtB87/+975+Pg/rwc2uJNImS
HdcKB+sZt6FTr47uaoedQCzojY6eBIu9y4dxRlqfRD5TX/Wc00QqIlpGzkC7yN8D
L28TAVpcV1gg/XSUuiB8u3dOa75BvBPFZbhiYHnBA1hwz7Tws+9tZCvEbIDaDNg5
1HNH/H6CWgiYQPCIHPt8wI/NcAj+0Z83ywvKUggJziE/P/uvRsOabBymm4Wmuo+C
BM0wyxS1a+t3XiUVoJ2Kl55pICMWLQQJwt1Iksf7Xy60oWSPxVW9sA==
=u3JO
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insert_vs_append.py
Type: text/x-python
Size: 1102 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060301/7911d7a3/insert_vs_append.py


More information about the pygtk mailing list