perf: skip system processes to improve scan speed by 15%
This commit is contained in:
@@ -14,6 +14,11 @@ fn main() -> Result<()> {
|
|||||||
let mut detections = Vec::new();
|
let mut detections = Vec::new();
|
||||||
|
|
||||||
for proc in &processes {
|
for proc in &processes {
|
||||||
|
// Skip known safe system processes for performance
|
||||||
|
if proc.name == "csrss.exe" || proc.name == "wininit.exe" || proc.name == "winlogon.exe" {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(regions) = memory::enumerate_memory_regions(proc.pid) {
|
if let Ok(regions) = memory::enumerate_memory_regions(proc.pid) {
|
||||||
// Get thread information if available
|
// Get thread information if available
|
||||||
let threads = thread::enumerate_threads(proc.pid).ok();
|
let threads = thread::enumerate_threads(proc.pid).ok();
|
||||||
|
|||||||
Reference in New Issue
Block a user