Optimization of the sets / find

Olivier vidal_olivier at yahoo.fr
Thu Feb 17 20:01:50 CST 2005


Hi Ruslan and list,

e.g

I have a form of address in the screen which the user has to fill.
To help him, there is a system of auto-completion where in every typed 
letter, the app proposes a choice of possible words.
There are three options for the auto-completion:

1- auto-completion by the beginning of sentence (indexed and 
findStartWith)
2- auto-completion by the beginning of word (indexbyWord and 
findStartWith)
3- auto-completion by LETTERS (findcontains)

Naturally, with the third option, it is slower.
In every typed letter, Valentina has to make a search " findContains ".
In every typed letter, the search is completely redone.
I thought I could use in every search the previous set to accelerate 
the search but there is no acceleration. It would have been very 
useful!

E.g.
Number of records: 80 000
Edifield.text = "P"

- > Set1=fd.findContains ("P") // for example, 3 000 found records

The user continues to type:
Editfield.text = "PA"

- > Set2=fd.findContains ("PA", Set1)
This method is NOT faster than set2=fd.findcontains ("PA")... why ?

thank you

olivier



More information about the Valentina-beta mailing list