Fetching the TTY name of a process is extremely expensive on darwin and
the call to devname accounts for 95% of htop's CPU usage when there is
high process turnover (this is mostly due to devname calling lstat,
which is incredibly slow). This can make htop unresponsive.
To mitigate this only set the process TTY name if the it is being
actively displayed (PROCESS_FLAG_TTY), which by default it is not
on darwin.
[TPGID]={.name="TPGID",.title="TPGID",.description="Process ID of the fg process group of the controlling terminal",.flags=0,.pidColumn=true,},
[MINFLT]={.name="MINFLT",.title=" MINFLT ",.description="Number of minor faults which have not required loading a memory page from disk",.flags=0,.defaultSortDesc=true,},
[MAJFLT]={.name="MAJFLT",.title=" MAJFLT ",.description="Number of major faults which have required loading a memory page from disk",.flags=0,.defaultSortDesc=true,},
@ -276,6 +277,18 @@ static long long int nanosecondsToCentiseconds(uint64_t nanoseconds) {