mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Split RichString_(append|appendn|write) into wide and ascii
RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters.
This commit is contained in:

committed by
BenBE

parent
5506925b34
commit
157086e750
@ -92,9 +92,9 @@ void ProcessList_printHeader(ProcessList* this, RichString* header) {
|
||||
|
||||
int color = (this->settings->sortKey == fields[i]) ?
|
||||
CRT_colors[PANEL_SELECTION_FOCUS] : CRT_colors[PANEL_HEADER_FOCUS];
|
||||
RichString_append(header, color, field);
|
||||
RichString_appendWide(header, color, field);
|
||||
if (COMM == fields[i] && this->settings->showMergedCommand) {
|
||||
RichString_append(header, color, "(merged)");
|
||||
RichString_appendAscii(header, color, "(merged)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user