Ignore:
Timestamp:
Jan 2, 2007, 8:29:54 PM (19 years ago)
Author:
RBRi
Message:

% use new debug unit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/SearchUnit.pas

    r33 r43  
    4848uses
    4949  SysUtils,
     50  DebugUnit,
    5051  ACLStringUtility,
    51   ACLProfile,
    5252  HelpTopic;
    5353
     
    360360    Term := Query.Term[ TermIndex ];
    361361
    362     ProfileEvent( 'Searching for term "'
     362    LogEvent(LogSearch, 'Searching for term "'
    363363                  + Term.Text
    364364                  + '", '
     
    379379      TermPart := Term.Parts[ TermPartIndex ];
    380380
    381       ProfileEvent( '  Searching for [' + TermPart + ']' );
     381      LogEvent(LogSearch, '  Searching for [' + TermPart + ']' );
    382382
    383383      AllocUInt32Array( DictionaryRelevances,
     
    416416      // this search term part, search topic texts
    417417
    418       ProfileEvent( '  Dictionary search done' );
     418      LogEvent(LogSearch, '  Dictionary search done' );
    419419      ClearUInt32Array( TopicsMatchingTermPart,
    420420                        TopicCount );
     
    441441      end;
    442442
    443       ProfileEvent( 'TOpic searches done' );
     443      LogEvent(LogSearch, 'Topic searches done' );
    444444
    445445      if TermPartIndex = 0 then
     
    460460    // for all parts of the term. Now combine all together
    461461
    462     ProfileEvent( 'Checking for sequences' );
     462    LogEvent(LogSearch, 'Checking for sequences' );
    463463    for TopicIndex := 0 to TopicCount - 1 do
    464464    begin
     
    494494    // Search titles and index
    495495
    496     ProfileEvent( '  Searching titles' );
     496    LogEvent(LogSearch, '  Searching titles' );
    497497    SearchTopicTitles( HelpFile, Term.Text, TopicsMatchingTerm );
    498498
    499     ProfileEvent( '  Searching index' );
     499    LogEvent(LogSearch, '  Searching index' );
    500500    SearchIndex( HelpFile, Term.Text, TopicsMatchingTerm );
    501501
    502     ProfileEvent( '  Combining' );
     502    LogEvent(LogSearch, '  Combining' );
    503503    case Term.CombineMethod of
    504504      cmOptional:
     
    530530  end;
    531531
    532   ProfileEvent( 'Search completed, converting to list' );
     532  LogEvent(LogSearch, 'Search completed, converting to list' );
    533533
    534534  // Now convert to list form.
     
    547547  end;
    548548
    549   ProfileEvent( 'Freeing arrays' );
     549  LogEvent(LogSearch, 'Freeing arrays' );
    550550  FreeUInt32Array( TopicRelevances, TopicCount );
    551551  FreeUInt32Array( TopicsExcluded, TopicCount );
     
    554554  FreeUInt32Array( TopicsMatchingDictWord, TopicCount );
    555555
    556   ProfileEvent( 'Done' );
     556  LogEvent(LogSearch, 'Done' );
    557557end;
    558558
Note: See TracChangeset for help on using the changeset viewer.