From 6bbb454881986a1a4d2e639b5fb6b7ac47374fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Wed, 14 Apr 2021 20:55:48 +0200 Subject: LinuxProcess: print default buffer in ascii `RichString_appendWide()` is more expensive than `RichString_appendAscii()` due to the calls to `mbstowcs(3)` and `iswprint(3)`. Use the latter to print the process field buffer by default. For the following fields this theoretically can corrupt the output: - SECATTR - CGROUP - CTID --- linux/LinuxProcess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 61f22349..f511b413 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -744,7 +744,7 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces Process_writeField(this, str, field); return; } - RichString_appendWide(str, attr, buffer); + RichString_appendAscii(str, attr, buffer); } static double adjustNaN(double num) { -- cgit v1.2.3