Re: UT_Vector IS slowing us down


Subject: Re: UT_Vector IS slowing us down
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Jun 08 2000 - 03:14:09 CDT


On Thu, 8 Jun 2000, Aaron Lehmann wrote:

> At the advice of a few people on this list who know more about application
> development than I do, I profiled AbiWord with a very simple test: typing
> a paragraph full of 'a' 's. The results were pretty interesting.
> pt_PieceTable::getSpanPtr gets called over 786,000 times during this
> simple test, and it accounts for 6.87 percent of the time. And now, the
> award for most-called function: UT_Vector::getNthItem, called over a
> million times and accounting for 1.79 percent of the time the program took
> to run.
>
> I think a good way to optimize would be to prevent functions like
> pt_PieceTable::getSpanPtr, PD_Document::getSpanPtr,
> pt_VarSet::getPointer, pf_Frag_Text::getBufIndex, and
> fl_BlockLayout::getSpanPtr from being called on the order of 800,000 times
> for this simple test as they do now. AFAIK, the app really should not
> need to get a span pointer almost a million times for inserting under
> 500 characters. Any ideas of how to go about doing this?
>

Is there some way to measure the time X11 is called during this test? It
is my belief that it is the drawing code that is actually taking up most
of the CPU time. However a lot of the X11 calls are actually outside Abi
and in the X11 server.

Although 1 million calls to the piece table is a lot it proababally took a
good 20 seconds to fill your paragraph with "a"'s. Since we typically run
on 100 MIP or greater machines these days this may not be a large fraction
of the CPU power of a typical machine.

Is gprof smart enough to profile time spent in X11? If not
consider it a feature request :-)

Cheers

Martin



This archive was generated by hypermail 2b25 : Thu Jun 08 2000 - 03:14:29 CDT