speed hack for long tables

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7047 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-05-26 11:33:37 +00:00
parent 159191e867
commit 50fe44383b
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-05-26 John Levon <levon@movementarian.org>
* insettabular.C: avoid drawing all of a long table
if it's not needed. A big speedup
2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
* remove same_id from function signatures, adjust

View File

@ -333,6 +333,12 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
nx += tabular->GetWidthOfColumn(cell);
++cell;
}
// avoiding drawing the rest of a long table is
// a pretty big speedup
if (baseline > bv->workHeight())
break;
baseline += tabular->GetDescentOfRow(i) +
tabular->GetAscentOfRow(i + 1) +
tabular->GetAdditionalHeight(i + 1);