|
2 | 2 | // Part of PowerShell module : GenXdev.FileSystem |
3 | 3 | // Original cmdlet filename : Find-Item.Fields.cs |
4 | 4 | // Original author : René Vaessen / GenXdev |
5 | | -// Version : 1.270.2025 |
| 5 | +// Version : 1.272.2025 |
6 | 6 | // ################################################################################ |
7 | 7 | // MIT License |
8 | 8 | // |
@@ -191,25 +191,27 @@ public partial class FindItem : PSCmdlet |
191 | 191 | */ |
192 | 192 | protected readonly ConcurrentQueue<string> DirQueue = new(); |
193 | 193 | protected readonly ConcurrentQueue<object> OutputQueue = new(); |
194 | | - protected readonly ConcurrentQueue<string> ProgressQueue = new(); |
195 | 194 | protected readonly ConcurrentQueue<string> VerboseQueue = new(); |
| 195 | + protected readonly ConcurrentQueue<string> FileContentMatchQueue = new(); |
196 | 196 | protected readonly List<Task> Workers = new List<Task>(); |
197 | 197 | protected readonly object WorkersLock = new object(); |
198 | 198 |
|
199 | 199 | // Cancellation source to handle timeouts and user interruptions gracefully |
200 | | - protected CancellationTokenSource? cts; |
| 200 | + protected CancellationTokenSource cts; |
201 | 201 |
|
202 | 202 | // Counters for tracking progress: number of files found and directories |
203 | 203 | // queued |
204 | | - protected long filesFound = 0; |
205 | | - protected long dirsQueued = 0; |
206 | | - protected long dirsUnQueued = 0; |
207 | | - |
208 | | - /// <summary> |
209 | | - /// Maximum file size to process for content search, calculated based on |
210 | | - /// available RAM |
211 | | - /// </summary> |
212 | | - protected long MaxFilesizeToProcess = 1024 * 1024 * 50; |
| 204 | + protected long directoryProcessors; |
| 205 | + protected long matchProcessors; |
| 206 | + protected long filesFound; |
| 207 | + protected long fileMatchesActive; |
| 208 | + protected long fileMatchesStarted; |
| 209 | + protected long fileMatchesCompleted; |
| 210 | + protected long dirsQueued; |
| 211 | + protected long dirsUnQueued; |
| 212 | + protected long lastProgress; |
| 213 | + protected int oldMaxWorkerThread; |
| 214 | + protected int oldMaxCompletionPorts; |
213 | 215 |
|
214 | 216 | /// <summary> |
215 | 217 | /// Flag for enabling verbose output based on user preferences |
|
0 commit comments