From 0458122db0a2ebd1d3779469cb6184d8b195be09 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 26 Oct 2011 08:19:05 -0200 Subject: perf ui browser: No need to switch char sets that often Just before and after the loop. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-0lh91cedngyg1pqarbky5vn7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/ui/browser.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c index 29c68aee00d..8607efa1356 100644 --- a/tools/perf/util/ui/browser.c +++ b/tools/perf/util/ui/browser.c @@ -231,13 +231,15 @@ static void ui_browser__scrollbar_set(struct ui_browser *browser) (browser->nr_entries - 1)); } + SLsmg_set_char_set(1); + while (h < height) { ui_browser__gotorc(browser, row++, col); - SLsmg_set_char_set(1); - SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_BOARD_CHAR); - SLsmg_set_char_set(0); + SLsmg_write_char(h == pct ? SLSMG_DIAMOND_CHAR : SLSMG_CKBRD_CHAR); ++h; } + + SLsmg_set_char_set(0); } static int __ui_browser__refresh(struct ui_browser *browser) -- cgit v1.2.3-70-g09d2