Don't iterate over all system processes (#11281)
Release Notes: - Fixed a UI beachball when gathering process information
This commit is contained in:
parent
3b5fd4ea66
commit
b487f2ce6f
2 changed files with 38 additions and 34 deletions
|
@ -98,8 +98,14 @@ impl PtyProcessInfo {
|
|||
|
||||
fn refresh(&mut self) -> Option<&Process> {
|
||||
let pid = self.pid_getter.pid()?;
|
||||
self.system.refresh_processes_specifics(self.refresh_kind);
|
||||
self.system.process(pid)
|
||||
if self
|
||||
.system
|
||||
.refresh_process_specifics(pid, self.refresh_kind)
|
||||
{
|
||||
self.system.process(pid)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn load(&mut self) -> Option<ProcessInfo> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue