On Thu, Jun 14, 2007 at 09:01:49PM +0200, Andre Poenitz wrote: > On Thu, Jun 14, 2007 at 05:05:32PM +0200, Stefan Schimanski wrote: > > I did some profiling of paragraph drawing. 20% of the whole time > > while inserting characters and redrawing the screen was taken by > > Paragraph::getInset calls, each for every character. This is stupid. > > See the patch below for a loop iterating over the insets of a > > paragraph instead. O(insetnumber) instead of O(charnumber * ln > > insetnumber). > > > > Stefan > >
... > > Good catch. Patch is fine with me. > > [And I continue hating that wide() business ;-}] > > Andre' Come and help rip it out from 1.6 in Bromarv... Abdel's idea is sound and perhaps that's what I should have done in the first place rather than this elaborate hack. - Martin