Upload README.md
Browse files
README.md
CHANGED
|
@@ -41,13 +41,24 @@ dotnet run
|
|
| 41 |
|
| 42 |
The app reads the NTFS Master File Table (MFT) directly via `FSCTL_ENUM_USN_DATA` / direct `$MFT` read, builds an in-memory index, and keeps it in sync via the USN Change Journal. Search is name-only with fuzzy matching and type-based ranking.
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
## Known Issues / TODO
|
| 45 |
|
| 46 |
-
- [
|
| 47 |
-
- [
|
| 48 |
-
- [
|
| 49 |
-
- [
|
| 50 |
-
- [ ]
|
|
|
|
|
|
|
| 51 |
|
| 52 |
<!-- ml-intern-provenance -->
|
| 53 |
## Generated by ML Intern
|
|
|
|
| 41 |
|
| 42 |
The app reads the NTFS Master File Table (MFT) directly via `FSCTL_ENUM_USN_DATA` / direct `$MFT` read, builds an in-memory index, and keeps it in sync via the USN Change Journal. Search is name-only with fuzzy matching and type-based ranking.
|
| 43 |
|
| 44 |
+
## Performance Fixes Applied
|
| 45 |
+
|
| 46 |
+
- **Zero-CPU hotkey thread**: Switched from `PeekMessageW` polling (`Thread.Sleep(10)`) to blocking `GetMessageW` with a manual reset event for clean shutdown. Idle CPU is now 0%.
|
| 47 |
+
- **Allocation-free search**: `SearchEngine` uses cached lowercase string arrays (`IndexStore.NameCache` / `NameLowerCache`) instead of calling `Encoding.UTF8.GetString` in the hot loop. Uses `Span<char>` for matching, stack-allocated candidate arrays, and `[ThreadStatic]` reusable `StringBuilder` for path building.
|
| 48 |
+
- **Debounced search**: TextChanged no longer blocks the UI thread. Searches run on a background thread with 25ms debounce and a `CancellationTokenSource` to cancel stale queries.
|
| 49 |
+
- **DWM rounded corners**: Added `DwmSetWindowAttribute` with `DWMWA_WINDOW_CORNER_PREFERENCE=DWMWCP_ROUND` for native Windows 11 rounded window corners, plus `DWMWA_USE_IMMERSIVE_DARK_MODE`.
|
| 50 |
+
- **Arena-based inserts**: `IndexStore` keeps `List<byte>` for arenas (O(1) append instead of `Array.Resize` on every insert). Live updates no longer copy the entire arena array.
|
| 51 |
+
- **Lock isolation**: Search result building (path resolution, exclusion filtering, ranking) happens outside the `lock(_indexLock)` — only the candidate matching is inside. Deadlocks eliminated.
|
| 52 |
+
|
| 53 |
## Known Issues / TODO
|
| 54 |
|
| 55 |
+
- [x] DWM rounded corners — fixed via `DwmSetWindowAttribute` P/Invoke
|
| 56 |
+
- [x] Zero-CPU hotkey thread — fixed via `GetMessageW` + manual reset event
|
| 57 |
+
- [x] Arena allocation churn — fixed via `List<byte>.AddRange`
|
| 58 |
+
- [x] Search blocking UI — fixed via debounced background search
|
| 59 |
+
- [ ] Search results could use a virtualized `ListView` with container recycling for >10k visible items
|
| 60 |
+
- [ ] No system tray icon — app runs hidden with hotkey toggle only
|
| 61 |
+
- [ ] No settings UI for exclusions
|
| 62 |
|
| 63 |
<!-- ml-intern-provenance -->
|
| 64 |
## Generated by ML Intern
|