Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Speed problem with BuildWordList |
Thu, Sep 6 2007 10:15 AM | Permanent Link |
Igor Colovic | Procedure TDataEngine.BuildWordList is slow because it is searching WordList twice, witch
is bad. I have changed code TextIndexTokenFilter(TableName,FieldName,StrPas(@CurWord),Include); if Include then begin // if WordList.Find(StrPas(@CurWord),CurWordPos) then <-- Here WordList is searched for CurWord and is returning CurWordPos // WordList.Objects[CurWordPos]:= // TObject(MinimumInteger(High(Word),(Integer(WordList.Objects[CurWordPos])+1))) // else // WordList.AddObject(StrPas(@CurWord),TObject(1)); <-- Here WordList is again searched (by AddObject if list is sorted) CurWordPos := WordList.AddObject(StrPas(@CurWord),TObject(0)); * WordList.Objects[CurWordPos]:= TObject(MinimumInteger(High(Word),(Integer(WordList.Objects[CurWordPos])+1))) ** * We are trying to add new word (with number of occurences 0). Because WordList is set to be Ignore duplicates AddObject will: 1. If word exist just return CurWordPos 2. If word dose not exists Insert word and return CurWordPos ** Here we add number of occurrecens |
Fri, Sep 7 2007 6:05 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Igor,
<< Procedure TDataEngine.BuildWordList is slow because it is searching WordList twice, witch is bad. >> I'll see about improving this for the next build. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |