anshdadhich commited on
Commit
3301306
·
verified ·
1 Parent(s): 83d4fdc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -5
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
- - [ ] The `SetWindowPos` + `AllowTransparency` combo doesn't give true rounded window corners on Windows 10 (use `DWMWA_WINDOW_CORNER_PREFERENCE` via P/Invoke for native DWM rounding)
47
- - [ ] `FindWindowW` class name matching may fail if WPF doesn't register the class; use window title or `HwndSource.AddHook` for inter-process toggle
48
- - [ ] The `ReadFile` P/Invoke for MFT direct read requires `FILE_FLAG_NO_BUFFERING` on some systems
49
- - [ ] `PeekMessageW` in a hotkey thread should use `GetMessageW` for lower CPU usage
50
- - [ ] Index store arena allocation during live updates (Insert/Remove) could be optimized with memory pooling instead of full reallocation
 
 
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