]> git.lyx.org Git - features.git/commit
Trying to solve bug-2452, I optimized some of the most significant problems outlined...
authorAbdelrazak Younes <younes@lyx.org>
Sun, 22 Apr 2007 08:26:06 +0000 (08:26 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 22 Apr 2007 08:26:06 +0000 (08:26 +0000)
commit24c8ca10d21a079939a901bb128300d6663a3e8a
tree82ad40a689fae6dbb9fbcb8cde3a4255055fa128
parent48744f0fbd7c3f4b455c1531af08fb97ce16cd45
Trying to solve bug-2452, I optimized some of the most significant problems outlined in the profile report attached in there.

This commit avoids unnecessary metrics recalculations by caching the last LyXFont used. I had to cleanup the width(), ascent() and descend() redundancies by transferring that to InsetBase.

InsetMathDim should go now as it is not really needed.

* InsetBase: properly handle inset Dimension.

* InsetOld: get rid of redundant width(), ascent() and descent()

* InsetMathDim: ditto

* InsetMathChar::metrics(): avoid metrics recalculation if font is unchanged.

* InsetMathSymbol::metrics(): ditto

* InsetMathKern: use InsetBase::dim_ instead of local ones.

* InsetMathSpace:
  - use InsetBase::dim_ instead of local ones.
  - space to width transformation transferred to anonymous namespace.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17899 a592a061-630c-0410-9148-cb99ea01b6c8
13 files changed:
src/insets/inset.C
src/insets/inset.h
src/insets/insetbase.h
src/mathed/InsetMathChar.C
src/mathed/InsetMathChar.h
src/mathed/InsetMathDim.C
src/mathed/InsetMathDim.h
src/mathed/InsetMathKern.C
src/mathed/InsetMathKern.h
src/mathed/InsetMathSpace.C
src/mathed/InsetMathSpace.h
src/mathed/InsetMathSymbol.C
src/mathed/InsetMathSymbol.h