Re: entry completion for hundreds of thousands of items

Adrien <[email protected]> Sat, 4 Sep 2010 12:37:04 +0200
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
Hi,

I've only taken a very quick look at your code but I think that what
you need is described in the treeview tutorial[1].

Also, I've experienced such issues with pretty short lists or trees.
No need to have 1000 elements, something like 50 or 100 may be enough
to notice a slowdown.

Hope this helps.

[1] http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/treeview-tutorial/ch03s03.html#sec-treestore-adding-many-rows

--
Adrien Nader


On 04/09/2010, yoann padioleau <[email protected]> wrote:
> Hi,
>
> I want to provide some completion for text where the corpus of items is
> above 100000. I've tried to build a GTree.list_store with those 100000 items
> but it takes a too long time to build the model. I've then tried to
> split those 100 000 iterms
> in chunk of 1000 based on common prefix.  Then as the user start to
> type a string, I build a model
> with only the relevant 1000 items. But even building a model with only
> 1000 items takes more than 2 seconds
> which makes the whole application look slow. Is there a way to
> accelerate the insertion of items
> in a list_store ?
>
> I've attached my modification of src/examples/entrycompletion.ml
> showing how slow it is.
>