Inserting rows into GTree.tree_store is slow

Berke Durak obdurak at
Fri Mar 11 01:53:40 CET 2005

On Fri, Mar 11, 2005 at 12:32:16AM +0000, Richard Jones wrote:
> I have a program which loads a file and inserts around 25,000 rows
> into a GTree.tree_store model.  This process takes about 10 minutes.
> I had initially blamed the (OCaml-based) loading and parsing code, but
> now that I come to analyse it, it turns out that the OCaml code is
> almost instantaneous (no suprise there!) but inserting the rows into
> the GTree.tree_store is what is taking all the time.
> I'm wondering if there is a particular reason for this.  Is it just
> that the underlying C model is slow, or could it be the OCaml
> bindings?  Are there good ways to "bulk insert" lots of rows into a
> tree_store?
> Rich.


I know CList is obsolete, but it runs quite fast.  For instance inserting
34,030 rows takes about 5 seconds on a PIV at 2,4GHz in xara (native code).
Berke Durak

More information about the Lablgtk-list mailing list