From: Tomas Frydrych (tomasfrydrych_at_yahoo.co.uk)
Date: Fri Nov 28 2003 - 14:22:03 EST
up to now every time fp_TextRun::recalcWidth() was called (i.e., when
runs merged, run was split, characters deleted from it, etc.), we re-
measured every character in the run. This is more often than not
unnecessary. I moved the the code that measures characters into
fp_TextRun::_measureCharWidths() only called from
fp_TextRun::_refreshDrawBuffer(), so that characters get only re-
measured when the content of the draw buffer is recalculated. Most
calls to fp_TextRun::recalcWidth() now result in simple adding of the
widths in the block cache.
I have not had the chance to do any profiling, but this should
substantially reduce calls to the character measuring routines of the
GR_Graphics.
files: fp_Run.h/cpp, fp_TextRun.h/cpp, fl_BlockLayout.cpp/h
Tomas
This archive was generated by hypermail 2.1.4 : Fri Nov 28 2003 - 14:22:49 EST