mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Performance improvement hackathon: improve process comparison routines,
disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
This commit is contained in:
@ -47,8 +47,8 @@ ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation ori
|
||||
this->y2 = y2;
|
||||
this->fuBar = NULL;
|
||||
this->orientation = orientation;
|
||||
this->items = Vector_new(PANEL_CLASS, owner, DEFAULT_SIZE);
|
||||
this->fuBars = Vector_new(FUNCTIONBAR_CLASS, true, DEFAULT_SIZE);
|
||||
this->items = Vector_new(PANEL_CLASS, owner, DEFAULT_SIZE, NULL);
|
||||
this->fuBars = Vector_new(FUNCTIONBAR_CLASS, true, DEFAULT_SIZE, NULL);
|
||||
this->itemCount = 0;
|
||||
this->owner = owner;
|
||||
return this;
|
||||
@ -130,7 +130,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
|
||||
if (this->fuBar)
|
||||
FunctionBar_draw(this->fuBar, NULL);
|
||||
|
||||
int ch;
|
||||
int ch = 0;
|
||||
while (!quit) {
|
||||
int items = this->itemCount;
|
||||
for (int i = 0; i < items; i++) {
|
||||
|
Reference in New Issue
Block a user