Re: Early Gnome-terminal profiling



On Sun, 2005-10-30 at 22:46 -0800, Travis Reitter wrote:

> Here's the rough draft (please don't link to it - the final release will
> be a blog post, once I've gotten a little review, and polished it up a
> little): http://www.netdrain.com/performance/gnome-term-prof/index.html

Very interesting.  What's the percentage of time spent in the X server?

If the time shows up being spent in "[heap]", it means you are using a
server with the home-grown module loader - this won't let sysprof look
into it.

If the time spent in the server is too large, then that's why other apps
feel unresponsive in the meantine.  You'll also have found that probably
the RENDER code paths in the server need to be optimized.

vte_sequence_handler_decset_internal() has a hefty chunk of Self timing.
I wonder how much that comes from initializing its huge non-static array
on every function call:

static gboolean
vte_sequence_handler_decset_internal(VteTerminal *terminal,
				     int setting,
				     gboolean restore,
				     gboolean save,
				     gboolean set)
{
	gboolean recognized = FALSE, again = FALSE;
	gpointer p;
	int i;
	struct {
		int setting;
		gboolean *bvalue;
		gint *ivalue;
		gpointer *pvalue;
		gpointer fvalue;
		gpointer tvalue;
		VteTerminalSequenceHandler reset, set;
	} settings[] = {
		/* 1: Application/normal cursor keys. */
		{1, NULL, &terminal->pvt->cursor_mode, NULL,
		 GINT_TO_POINTER(VTE_KEYMODE_NORMAL),
		 GINT_TO_POINTER(VTE_KEYMODE_APPLICATION),
		 NULL, NULL,},
		/* 2: disallowed, we don't do VT52. */
		{2, NULL, NULL, NULL, NULL, NULL, NULL, NULL,},
		/* 3: disallowed, window size is set by user. */
		{3, NULL, NULL, NULL, NULL, NULL, NULL, NULL,},
		/* 4: Smooth scroll. */
                ....
       ^^^ how much time from initializing settings[] on every call?

Is that function called very frequently during the lifetime of a
terminal?  Or is it an initialization thing?

  Federico




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]