Ignore:
Timestamp:
Mar 18, 2010, 11:33:54 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
6acc8e4
Parents:
f87c2a
git-author:
Frederik Heber <heber@…> (03/18/10 10:26:55)
git-committer:
Frederik Heber <heber@…> (03/18/10 11:33:54)
Message:

Log() and eLog() are prepended by a DoLog()/DoeLog() construct.

  • Most of the run time (95%) is spent on verbosity that it is discarded anyway due to a low verbosity setting. However, the operator << is evaluated from the right-hand side, hence the whole message is constructed and then thrown away.
  • DoLog() and DoeLog() are new functions that check the verbosity beforehand and are used as follows: DoLog(2) && (Log() << verbose(2) << "message" << endl);

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/bondgraph.cpp

    rf87c2a r12f57b  
    5858    Log() << Verbose(1) << "Parsing bond length matrix successful." << endl;
    5959  } else {
    60     eLog() << Verbose(1) << "Parsing bond length matrix failed." << endl;
     60    DoeLog(1) && (eLog()<< Verbose(1) << "Parsing bond length matrix failed." << endl);
    6161  }
    6262
     
    159159{
    160160  if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet
    161     eLog() << Verbose(2) << "BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl;
     161    DoeLog(2) && (eLog()<< Verbose(2) << "BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl);
    162162    CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
    163163  } else {
Note: See TracChangeset for help on using the changeset viewer.