trace-view: Self-adjusting fixed width trace-view
Steven,
Please pull the latest for-rostedt/trace-view git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/dvhart/trace-cmd.git for-rostedt/trace-view
Quoted 1 line
From
358e0e5121098fac9eda8637def53233b5c7a905Mon Sep 17 00:00:00 2001
From: Darren Hart <[email protected]>
Date: Wed, 30 Dec 2009 11:09:53 -0800
Subject: [PATCH] trace-view: Self-adjusting fixed width trace-view
By using fixed width columns and fixed height rows, the view can now render over 400k events without any noticable lag. This makes it so large traces can now be viewed in one "page" of the trace-view-model.
The new trace-view-data-func() is called when the view wants to render cell (which it only has to do when it's visible now that we use fixed sizings). Here we check the string width in pixels and resize the column if necessary. By tracking the max character width of each column, we can avoid doing the expensive Pango pixel width test as often. By adding a little extra padding, we anticipate one more character, further reducing the overhead. The first full scroll down and up shows no noticable lag due to these calculations once the optimizations were implemented.
--- trace-view-store.h | 2 +- trace-view.c | 149 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 94 insertions(+), 57 deletions(-)
trace-view-store.h +1 -1
@@ -128,7 +128,7 @@ GType trace_view_store_get_type (void);TraceViewStore *trace_view_store_new (struct tracecmd_input *handle); -#define TRACE_VIEW_DEFAULT_MAX_ROWS 1000 +#define TRACE_VIEW_DEFAULT_MAX_ROWS 1000000#if 0 void trace_view_store_append_record (TraceViewStore *trace_view_store,
trace-view.c +93 -56
173 lines not on this page · raw message
Signature · 5 lines
1.6.3.3 -- Darren Hart IBM Linux Technology Center Real-Time Linux Team