提交 0458122d 编写于 作者: A Arnaldo Carvalho de Melo

perf ui browser: No need to switch char sets that often

Just before and after the loop.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-0lh91cedngyg1pqarbky5vn7@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 13d8f96c
...@@ -231,13 +231,15 @@ static void ui_browser__scrollbar_set(struct ui_browser *browser) ...@@ -231,13 +231,15 @@ static void ui_browser__scrollbar_set(struct ui_browser *browser)
(browser->nr_entries - 1)); (browser->nr_entries - 1));
} }
SLsmg_set_char_set(1);
while (h < height) { while (h < height) {
ui_browser__gotorc(browser, row++, col); ui_browser__gotorc(browser, row++, col);
SLsmg_set_char_set(1); SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_CKBRD_CHAR);
SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_BOARD_CHAR);
SLsmg_set_char_set(0);
++h; ++h;
} }
SLsmg_set_char_set(0);
} }
static int __ui_browser__refresh(struct ui_browser *browser) static int __ui_browser__refresh(struct ui_browser *browser)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册