mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Performance improvements due to conditional parsing of IO data depending on selected fields.
On my machine, this gives a ~20% improvement in htop process time use with the default config.
This commit is contained in:
@ -24,6 +24,12 @@ in the source distribution for its full text.
|
||||
#include "IOPriority.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#define PROCESS_FLAG_IO 1
|
||||
#define PROCESS_FLAG_IOPRIO 2
|
||||
#define PROCESS_FLAG_OPENVZ 4
|
||||
#define PROCESS_FLAG_VSERVER 8
|
||||
#define PROCESS_FLAG_CGROUP 16
|
||||
|
||||
#ifndef Process_isKernelThread
|
||||
#define Process_isKernelThread(_process) (_process->pgrp == 0)
|
||||
#endif
|
||||
@ -155,6 +161,8 @@ typedef struct Process_ {
|
||||
|
||||
extern const char *Process_fieldNames[];
|
||||
|
||||
extern const int Process_fieldFlags[];
|
||||
|
||||
extern const char *Process_fieldTitles[];
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user