diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2006-07-11 06:13:32 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2006-07-11 06:13:32 +0000 |
commit | 5d48ab8c28925f892e8e7f432f7d2b78c86e95c5 (patch) | |
tree | 13a209d132be00e28d24f9ce750a873055cfbd98 /htop.c | |
parent | 4c41e78bbfe34c67db16bbce8e0241ba583e8572 (diff) |
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.
Diffstat (limited to 'htop.c')
-rw-r--r-- | htop.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -245,7 +245,7 @@ int main(int argc, char** argv) { CRT_init(settings->delay, settings->colorScheme); - panel = Panel_new(0, headerHeight, COLS, LINES - headerHeight - 2, PROCESS_CLASS, false); + panel = Panel_new(0, headerHeight, COLS, LINES - headerHeight - 2, PROCESS_CLASS, false, NULL); Panel_setRichHeader(panel, ProcessList_printHeader(pl)); char* searchFunctions[3] = {"Next ", "Exit ", " Search: "}; @@ -506,7 +506,7 @@ int main(int argc, char** argv) { } case 'u': { - Panel* usersPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true); + Panel* usersPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true, ListItem_compare); Panel_setHeader(usersPanel, "Show processes of:"); UsersTable_foreach(ut, addUserToList, usersPanel); Vector_sort(usersPanel->items); @@ -569,7 +569,7 @@ int main(int argc, char** argv) { case '.': case KEY_F(6): { - Panel* sortPanel = Panel_new(0,0,0,0,LISTITEM_CLASS,true); + Panel* sortPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true, ListItem_compare); Panel_setHeader(sortPanel, "Sort by"); char* fuFunctions[2] = {"Sort ", "Cancel "}; ProcessField* fields = pl->fields; |