Changeset 1665


Ignore:
Timestamp:
Aug 5, 2012, 10:46:47 PM (13 years ago)
Author:
Gregg Young
Message:

Replace SleepIfNeeded with IdleIfNeeded to improve IU response during long searches; Currently it will switch back an forth between normal and idle priority.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/grep.c

    r1564 r1665  
    3939                in DoInsertion because pci is limited to 65535 files. (nRecord is a USHORT)
    4040                SHL's single loop fix.
     41  05 Aug 12 GKY Replace SleepIfNeeded with IdleIfNeeded to improve IU response during long searches; it
     42                will switch between normal and idle priority and back.
    4143
    4244***********************************************************************/
     
    502504      p = searchPath;
    503505    do {                                // Process each directory that matches the mask
    504       priority_normal();
     506      //priority_normal();
    505507      if (*grep->stopflag)
    506508        break;
     
    524526          // 07 Feb 08 SHL
    525527          if (IsITimerExpired(pitdReport)) {
     528            priority_normal();
    526529            if (!hwndStatus)
    527530              WinSetWindowText(grep->hwndCurFile, searchPath);
     
    532535                WinSetWindowText(hwndStatus, s);
    533536              }
    534             }
     537            };
    535538          }
    536539          DoAllSubdirs(grep, searchPath, TRUE, fle, numfls, pitdSleep, pitdReport);
     
    542545                          sizeof(ffb), (PULONG) & ulFindCnt));
    543546    DosFindClose(findHandle);
    544     priority_normal();
     547    //priority_normal();
    545548  }
    546549  if (p)                                // strip off last directory addition
     
    600603    do {
    601604      // Process each file that matches the mask
    602       priority_normal();
     605      //priority_normal();
    603606      pffbFile = pffbArray;
    604607      for (x = 0; x < ulFindCnt; x++) {
     
    653656      if (*grep->stopflag)
    654657        break;
    655       SleepIfNeeded(pitdSleep, 1);
     658      //SleepIfNeeded
     659      IdleIfNeeded(pitdSleep, 30);
    656660      ulFindCnt = FilesToGet;
    657661      rc = xDosFindNext(findHandle, pffbArray, ulBufBytes, &ulFindCnt, FIL_QUERYEASIZEL);
     
    659663
    660664    DosFindClose(findHandle);
    661     priority_normal();
     665    //priority_normal();
    662666  } // if
    663667
Note: See TracChangeset for help on using the changeset viewer.