Changeset 1759
- Timestamp:
- Mar 20, 2014, 3:47:49 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/dll/filldir.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r1756 r1759 96 96 31 May 11 SHL Disable antique debug code in RemoveCnrItems - really speeds up container close 97 97 12 Jun 11 GKY Added IdleIfNeeded to the container "free" loops to improve system 98 responsiveness when closing containers with large numbers of items98 responsiveness when closing containers with large numbers of items 99 99 12 Jun 11 GKY Replaced SleepIfNeeded with IdleIfNeeded in the container loade loop 100 100 22 Oct 11 GKY Removing unneeded UnFlesh call from StubbyScanThread appears to significantly speed opening of FM/2 101 101 02 Mar 14 GKY !didone for fFirstTime so the suggest code works again. Also clear out the 102 garbage that was appearing in the string.102 garbage that was appearing in the string. 103 103 02 Mar 14 GKY Speed up intial drive scans Ticket 528 104 19 Mar 14 SHL RemoveCnrItems: clean up odd code 104 105 105 106 ***********************************************************************/ … … 259 260 (fRScanSlow ? 0 : DRIVE_SLOW)))) { 260 261 Flesh(StubbyScan->hwndCnr, StubbyScan->pci); 261 }262 else {263 Stubby(StubbyScan->hwndCnr, StubbyScan->pci);264 }262 } 263 else { 264 Stubby(StubbyScan->hwndCnr, StubbyScan->pci); 265 } 265 266 } 266 267 else { … … 283 284 // Keep drive tree in sync with directory container 284 285 if (!PostMsg(hwndTree, UM_SHOWME, MPFROMP(pszFocusDir), MPVOID)) 285 free(pszFocusDir);286 free(pszFocusDir); 286 287 } 287 288 ProcessDirCount = 0; … … 325 326 cmp == *(ULONG *) ".TAR" || cmp == *(ULONG *) ".TGZ" || 326 327 cmp == *(ULONG *) ".GZ" || cmp == *(ULONG *) ".Z" || 327 cmp == *(ULONG *) ".CAB" || cmp == *(ULONG *) ".BZ2" ||328 cmp == *(ULONG *) ".WPI" || cmp == *(ULONG *) ".7Z")328 cmp == *(ULONG *) ".CAB" || cmp == *(ULONG *) ".BZ2" || 329 cmp == *(ULONG *) ".WPI" || cmp == *(ULONG *) ".7Z") 329 330 hptr = hptrArc; 330 331 else if (cmp == *(ULONG *) PCSZ_DOTBMP || … … 1087 1088 goto Abort; 1088 1089 1089 InitITimer(&itdSleep, 500);1090 InitITimer(&itdSleep, 500); 1090 1091 pci = NULL; 1091 1092 ullTotalBytes = 0; … … 1127 1128 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + sizeof(FILEFINDBUF4L)); 1128 1129 1129 if (!IdleIfNeeded(&itdSleep, 30)) {1130 for (x = x+1; x < cAffbTotal; x++) {1131 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec,1132 pffbFile, partial, dcd);1133 pci = (PCNRITEM) pci->rc.preccNextRecord;1134 ullTotalBytes += ullBytes;1135 if (dcd) {1136 dcd->totalfiles = x;1137 dcd->ullTotalBytes = ullTotalBytes;1138 }1139 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + sizeof(FILEFINDBUF4L));1140 if (pci == NULL) {1141 priority_normal();1142 InitITimer(&itdSleep, 500);1143 break;1144 }1145 }1146 }1130 if (!IdleIfNeeded(&itdSleep, 30)) { 1131 for (x = x+1; x < cAffbTotal; x++) { 1132 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1133 pffbFile, partial, dcd); 1134 pci = (PCNRITEM) pci->rc.preccNextRecord; 1135 ullTotalBytes += ullBytes; 1136 if (dcd) { 1137 dcd->totalfiles = x; 1138 dcd->ullTotalBytes = ullTotalBytes; 1139 } 1140 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + sizeof(FILEFINDBUF4L)); 1141 if (pci == NULL) { 1142 priority_normal(); 1143 InitITimer(&itdSleep, 500); 1144 break; 1145 } 1146 } 1147 } 1147 1148 1148 1149 if (pci == NULL && ulRecsToInsert) { … … 1174 1175 } 1175 1176 //SleepIfNeeded(&itdSleep, 1); 1176 }1177 priority_normal();1177 } 1178 priority_normal(); 1178 1179 if (ok) { 1179 1180 ullReturnBytes += ullTotalBytes; … … 1649 1650 ULONG flags = driveflags[iDrvNum]; // Speed up 1650 1651 if (~flags & DRIVE_INVALID && 1651 ~flags & DRIVE_NOPRESCAN && (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) {1652 // DbgMsg(pszSrcFile, __LINE__, "Begin Thread %s", pci->pszFileName);1653 if (xbeginthread(StubbyScanThread,1652 ~flags & DRIVE_NOPRESCAN && (!fNoRemovableScan || ~flags & DRIVE_REMOVABLE)) { 1653 // DbgMsg(pszSrcFile, __LINE__, "Begin Thread %s", pci->pszFileName); 1654 if (xbeginthread(StubbyScanThread, 1654 1655 65536, 1655 1656 stubbyScan, 1656 1657 pszSrcFile, __LINE__) == -1) 1657 xfree(stubbyScan, pszSrcFile, __LINE__);1658 xfree(stubbyScan, pszSrcFile, __LINE__); 1658 1659 1659 1660 } // if drive needs to be scanned … … 1740 1741 strcat(szSuggest, " %*"); 1741 1742 rc = saymsg(MB_YESNOCANCEL | MB_ICONEXCLAMATION, 1742 hwndParent ? hwndParent : hwndCnr,1743 GetPString(IDS_SUGGESTTITLETEXT),1744 GetPString(IDS_SUGGEST1TEXT),1745 (includesyours) ? GetPString(IDS_SUGGEST2TEXT) : NullStr,1746 szSuggest);1743 hwndParent ? hwndParent : hwndCnr, 1744 GetPString(IDS_SUGGESTTITLETEXT), 1745 GetPString(IDS_SUGGEST1TEXT), 1746 (includesyours) ? GetPString(IDS_SUGGEST2TEXT) : NullStr, 1747 szSuggest); 1747 1748 if (rc == MBID_YES) { 1748 1749 HOBJECT hFM2Object; … … 1965 1966 if (!IdleIfNeeded(&itdSleep, 30)) { 1966 1967 for (usCount = usCount + 1; pci; usCount++) { 1967 pciNext = (PCNRITEM) pci->rc.preccNextRecord;1968 FreeCnrItemData(pci);1969 pci = pciNext;1968 pciNext = (PCNRITEM) pci->rc.preccNextRecord; 1969 FreeCnrItemData(pci); 1970 pci = pciNext; 1970 1971 } 1971 1972 break; … … 1993 1994 PCNRITEM pci; 1994 1995 ITIMER_DESC itdSleep = { 0 }; // 30 May 11 GKY 1995 1996 1996 1997 1997 if ((usCnt && !pciFirst) || (!usCnt && pciFirst)) { … … 2015 2015 InitITimer(&itdSleep, 500); 2016 2016 while (pci) { 2017 #if 0 // 12 Sep 07 SHL dwg drivebar crash testing - ticket# ??? - fixme to be gone2018 static PCNRITEM pciLast; // 12 Sep 07 SHL2019 ULONG ulSize = sizeof(*pci);2020 ULONG ulAttr;2021 APIRET apiret = DosQueryMem((PVOID)pci, &ulSize, &ulAttr);2022 if (apiret)2023 Dos_Error(MB_ENTER, apiret, HWND_DESKTOP, pszSrcFile, __LINE__,2024 "DosQueryMem failed pci %p pciLast %p", pci, pciLast);2025 #endif2026 2017 FreeCnrItemData(pci); 2027 #if 0 // 12 Sep 07 SHL dwg drivebar crash testing - ticket# ??? - fixme to be gone2028 pciLast = pci;2029 #endif2030 2018 pci = (PCNRITEM)pci->rc.preccNextRecord; 2019 if (!pci) 2020 break; 2031 2021 if (remaining && --remaining == 0) 2032 2022 break; 2033 if (!IdleIfNeeded(&itdSleep, 30)) { 2034 while (pci) { 2035 FreeCnrItemData(pci); 2036 pci = (PCNRITEM)pci->rc.preccNextRecord; 2037 if (remaining && --remaining == 0) 2038 break; 2039 } 2040 } 2041 } 2023 IdleIfNeeded(&itdSleep, 30); 2024 } // while 2042 2025 priority_normal(); 2043 2026 DosPostEventSem(CompactSem);
Note:
See TracChangeset
for help on using the changeset viewer.
