Changeset 1873 for trunk/dll/treecnr.c
- Timestamp:
- Sep 26, 2015, 7:23:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1871 r1873 108 108 a thread. Loop and idle ExpandAll; Add CollapseAll; Move tree expand to a 109 109 thread; Have ShowTreeRec wait for the Flesh thread. 110 26 Sep 15 GKY Adjustments to ShowTreeRec to eliminate failures and reduce retries and container 111 noise on tree switches. 112 26 Sep 15 GKY Remove fInitialDriveScan code 113 26 Sep 15 GKY Changes to speed up ExpandAll 110 114 111 115 ***********************************************************************/ … … 191 195 BOOL fMiniLVM; 192 196 BOOL fLVM; 197 BOOL fExpandAll; 193 198 HPOINTER hptrDunno; 194 199 HWND hwndMainMenu; … … 203 208 static BOOL fOkayMinimize; 204 209 static HMQ hmqExpandTree; 205 static BOOL fExpandAll;206 210 207 211 APIRET16 APIENTRY16 Dos16MemAvail(PULONG pulAvailMem); … … 305 309 CHAR chSaved; 306 310 307 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec called for pszDir_ \"%s\"", pszDir_); // 2015-08-04 SHL FIXME debug 308 309 strcpy(szDirArg, pszDir_); // Cache here in case arg content changed by some other thread 310 311 strcpy(szDirArg, pszDir_); // Cache here in case arg content changed by some other thread 312 311 313 // already positioned to requested record? 312 314 pci = WinSendMsg(hwndCnr, … … 314 316 MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED)); 315 317 if (pci && (INT)pci != -1 && !stricmp(pci->pszFileName, szDirArg)) { 316 found = TRUE;317 318 quickbail = TRUE; // Already at requested record - bypass repositioning 318 319 goto MakeTop; 319 320 } 320 // 2015-08-23 SHL FIXME to be gone - problem must be elsewhere321 // 2015-08-22 GKY Without this FM2 has NULL pci->pszFileName errors and switch failures322 if (fInitialDriveScan)323 DosSleep(100); // 100 still had errors324 if (fSwitchTreeOnDirChg)325 DosSleep(200);326 327 321 // 2015-08-13 SHL add retry logic 2015-08-22 GKY increase retries from 10 to 100 to 328 322 // eliminate switch failures on deep or large tree state switches … … 391 385 } 392 386 } 393 394 DosSleep(100); // 2015-08-13 SHL Let PM catch up 395 387 WaitFleshWorkListEmpty(NULL); // 2015-09-26 GKY Let Flesh thread catch up 396 388 } // while expanding 397 389 … … 404 396 if (~pci->rc.flRecordAttr & CRA_CURSORED) { 405 397 if (collapsefirst) { 398 WaitFleshWorkListEmpty(NULL); 406 399 pciP = WinSendMsg(hwndCnr, 407 400 CM_QUERYRECORD, … … 447 440 } 448 441 if (maketop || fTopDir) { 449 if (fCollapseFirst )442 if (fCollapseFirst && !quickbail) { 450 443 WaitFleshWorkListEmpty(NULL); //Let the root expand first otherwise it makes top 444 } 451 445 // 2015-08-23 SHL FIXME debug 452 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) f TopDir %i maketop %i", pciToSelect, fTopDir, maketop); // 2015-08-04 SHL FIXME debug446 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) filename %s", pciToSelect, pciToSelect->pszFileName); // 2015-08-04 SHL FIXME debug 453 447 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect); 454 448 } … … 759 753 #endif 760 754 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling ShowTreeRec(\"%s\")", mp1); // 2015-08-04 SHL FIXME debug 761 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 762 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug 755 priority_idle(); // 2015-09-26 GKY Majority of work done by Flesh and UI threads 756 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 757 priority_normal(); 758 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug 763 759 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 764 760 … … 3437 3433 driveserial[toupper(*pci->pszFileName) - 'A'] != 3438 3434 volser.serial) 3439 { // 2015-08-28 GKY fixme? I think this code runs on the UI thread3435 { 3440 3436 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3441 3437 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); … … 3446 3442 volser.serial)) { 3447 3443 if (qmsg.msg == UM_EXPANDTREE && AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh) 3448 && !dcd->suspendview && fTopDir ) {3444 && !dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) { 3449 3445 DosSleep(1); 3450 3446 WaitFleshWorkListEmpty(pci->pszFileName); … … 3456 3452 else { 3457 3453 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 3458 // 2015-08-28 GKY fixme? I think this code runs on the UI thread3459 3454 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3460 3455 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh);
Note:
See TracChangeset
for help on using the changeset viewer.