Date: Fri, 11 Mar 2005 01:53:40 +0100 From: Berke Durak To: Richard Jones Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: Inserting rows into GTree.tree_store is slow Message-ID: <20050311005340.GJ2963 at ara.zapto.org> References: <20050311003216.GA31634 at furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050311003216.GA31634 at furbychan.cocan.org> 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. Hello, 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