Changeset 1570 for trunk/dll/filldir.c
- Timestamp:
- Jun 13, 2011, 12:09:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/filldir.c
r1567 r1570 95 95 30 May 11 GKY Added SleepIfNeeded to DosFind and container load loops to improve WPS responsiveness 96 96 31 May 11 SHL Disable antique debug code in RemoveCnrItems - really speeds up container close 97 12 Jun 11 GKY Added IdleIfNeeded to the container "free" loops to improve system 98 responsiveness when closing containers with large numbers of items 99 12 Jun 11 GKY Replaced SleepIfNeeded with IdleIfNeeded in the container loade loop 97 100 98 101 ***********************************************************************/ … … 986 989 &ulFindCnt, 987 990 FIL_QUERYEASIZEL); 988 //priority_normal();991 priority_normal(); 989 992 pszFileSpec[strlen(pszFileSpec) - 1] = 0; // Chop off wildcard 990 993 if (!rc) { … … 1113 1116 ulFindCnt = ulFindMax; 1114 1117 rc = xDosFindNext(hdir, paffbFound, ulBufBytes, &ulFindCnt, FIL_QUERYEASIZEL); 1115 //priority_normal();1118 priority_normal(); 1116 1119 if (rc) 1117 1120 DosError(FERR_DISABLEHARDERR); … … 1130 1133 goto Abort; 1131 1134 1135 InitITimer(&itdSleep, 500); 1132 1136 pci = NULL; 1133 1137 ullTotalBytes = 0; … … 1169 1173 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + sizeof(FILEFINDBUF4L)); 1170 1174 1175 if (!IdleIfNeeded(&itdSleep, 30)) { 1176 for (x = x+1; x < cAffbTotal; x++) { 1177 ullBytes = FillInRecordFromFFB(hwndCnr, pci, pszFileSpec, 1178 pffbFile, partial, dcd); 1179 pci = (PCNRITEM) pci->rc.preccNextRecord; 1180 ullTotalBytes += ullBytes; 1181 if (dcd) { 1182 dcd->totalfiles = x; 1183 dcd->ullTotalBytes = ullTotalBytes; 1184 } 1185 pffbFile = (PFILEFINDBUF4L)((PBYTE)pffbFile + sizeof(FILEFINDBUF4L)); 1186 if (pci == NULL) { 1187 priority_normal(); 1188 InitITimer(&itdSleep, 500); 1189 break; 1190 } 1191 } 1192 } 1193 1171 1194 if (pci == NULL && ulRecsToInsert) { 1172 1195 memset(&ri, 0, sizeof(RECORDINSERT)); … … 1195 1218 } 1196 1219 } 1197 SleepIfNeeded(&itdSleep, 1); 1198 } 1220 //SleepIfNeeded(&itdSleep, 1); 1221 } 1222 priority_normal(); 1199 1223 if (ok) { 1200 1224 ullReturnBytes += ullTotalBytes; … … 1985 2009 FreeCnrItemData(pci); 1986 2010 pci = pciNext; 1987 SleepIfNeeded(&itdSleep, 1); 1988 } 1989 2011 if (!IdleIfNeeded(&itdSleep, 30)) { 2012 for (usCount = usCount + 1; pci; usCount++) { 2013 pciNext = (PCNRITEM) pci->rc.preccNextRecord; 2014 FreeCnrItemData(pci); 2015 pci = pciNext; 2016 } 2017 break; 2018 } 2019 } 2020 priority_normal(); 2021 DosPostEventSem(CompactSem); 1990 2022 if (usCount) { 1991 2023 if (!WinSendMsg(hwnd, CM_FREERECORD, MPFROMP(&pci), MPFROMSHORT(usCount))) { … … 2045 2077 if (remaining && --remaining == 0) 2046 2078 break; 2047 SleepIfNeeded(&itdSleep, 1); 2048 } 2079 if (!IdleIfNeeded(&itdSleep, 30)) { 2080 while (pci) { 2081 FreeCnrItemData(pci); 2082 pci = (PCNRITEM)pci->rc.preccNextRecord; 2083 if (remaining && --remaining == 0) 2084 break; 2085 } 2086 } 2087 } 2088 priority_normal(); 2089 DosPostEventSem(CompactSem); 2049 2090 } 2050 2091 }
Note:
See TracChangeset
for help on using the changeset viewer.