mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Avoid expensive build of tree when not using it
This commit is contained in:
parent
bd24664fc2
commit
2d874177bc
@ -564,11 +564,13 @@ void ProcessList_scan(ProcessList* this, bool pauseProcessUpdate) {
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out the hashtable to avoid any left-over processes from previous build
|
||||
//
|
||||
// The sorting algorithm relies on the fact that
|
||||
// len(this->displayTreeSet) == len(this->processes)
|
||||
Hashtable_clear(this->displayTreeSet);
|
||||
if (this->settings->treeView) {
|
||||
// Clear out the hashtable to avoid any left-over processes from previous build
|
||||
//
|
||||
// The sorting algorithm relies on the fact that
|
||||
// len(this->displayTreeSet) == len(this->processes)
|
||||
Hashtable_clear(this->displayTreeSet);
|
||||
|
||||
ProcessList_buildTree(this);
|
||||
ProcessList_buildTree(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user