Changeset 1649 for trunk/dll


Ignore:
Timestamp:
Nov 19, 2011, 9:38:33 PM (14 years ago)
Author:
Gregg Young
Message:

Cleanup the scanning code to try to improve scan times.

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/filldir.c

    r1644 r1649  
    257257                           (fRScanSlow ? 0 : DRIVE_SLOW)))) {
    258258              Flesh(StubbyScan->hwndCnr, StubbyScan->pci);
    259             }
     259            }
     260            else {
     261              Stubby(StubbyScan->hwndCnr, StubbyScan->pci);
     262            }
    260263          }
    261264          else {
     
    277280    if (fInitialDriveScan && fSwitchTree && hwndTree && fSaveState && pszFocusDir) {
    278281       // Keep drive tree in sync with directory container
    279       if (hwndMain) {
    280         //if (TopWindow(hwndMain, (HWND) 0) == dcd->hwndFrame)
    281           if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID))
    282             free(pszFocusDir);
    283       }
    284       else {
    285         if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID))
    286           free(pszFocusDir);
    287       }
     282      if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID))
     283        free(pszFocusDir);
    288284    }
    289285    ProcessDirCount = 0;
     
    296292
    297293}
    298 
    299 #if 0
    300 VOID ProcessDirectoryThread(VOID * arg)
    301 {
    302   PROCESSDIR *ProcessDir;
    303   HAB thab;
    304   HMQ hmq = (HMQ) 0;
    305 
    306 
    307   DosError(FERR_DISABLEHARDERR);
    308 
    309 # ifdef FORTIFY
    310   Fortify_EnterScope();
    311 #  endif
    312 
    313   ProcessDir = (PROCESSDIR *)arg;
    314   if (ProcessDir && ProcessDir->pciParent && ProcessDir->pciParent->pszFileName &&
    315       ProcessDir->hwndCnr) {
    316     thab = WinInitialize(0);
    317     if (thab) {
    318       hmq = WinCreateMsgQueue(thab, 0);
    319       if (hmq) {
    320         IncrThreadUsage();
    321         priority_normal();
    322         ProcessDirectory(ProcessDir->hwndCnr,
    323                          ProcessDir->pciParent,
    324                          ProcessDir->szDirBase,
    325                          ProcessDir->filestoo,
    326                          ProcessDir->recurse,
    327                          ProcessDir->partial,
    328                          ProcessDir->stopflag,
    329                          ProcessDir->dcd,               // Optional
    330                          ProcessDir->pulTotalFiles,     // Optional
    331                          ProcessDir->pullTotalBytes);   // Optional
    332         WinDestroyMsgQueue(hmq);
    333       }
    334       DecrThreadUsage();
    335       WinTerminate(thab);
    336     }
    337     free(ProcessDir);
    338   } // if ProcessDir
    339 # ifdef FORTIFY
    340   Fortify_LeaveScope();
    341 #  endif
    342 
    343 }
    344 # endif
    345294
    346295static HPOINTER IDFile(PSZ p)
  • trunk/dll/flesh.c

    r1551 r1649  
    192192                               MPFROMP(pciParent),
    193193                               MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER));
    194   if (!pciL || !*pciL->pszFileName) {
    195     if (pciL && (INT) pciL != -1)
    196       RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE);
     194  if (pciL && (INT) pciL != -1 &&* pciL->pszFileName) //{
     195    UnFlesh( hwndCnr, pciParent);
     196    //if (pciL && (INT) pciL != -1)
     197    //  RemoveCnrItems(hwndCnr, pciL, 1, CMA_FREE);
    197198    dcd = INSTDATA(hwndCnr);
    198199    if (dcd && dcd->size != sizeof(DIRCNRDATA))
     
    239240                       dcd,
    240241                       NULL,            // total files
    241                        NULL);           // total bytes
    242     //}
    243   }
    244   driveflags[*pciParent->pszFileName - 'A'] |= DRIVE_RSCANNED;
     242                       NULL);           // total bytes
     243#if 0
     244    }
     245#endif
     246    driveflags[*pciParent->pszFileName - 'A'] |= DRIVE_RSCANNED;
     247  //}
    245248  return TRUE;
    246249}
Note: See TracChangeset for help on using the changeset viewer.