From 619c1f0b45bffd19acb12d2b92db3d940ec53686 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 2 Apr 2003 13:28:29 +0000 Subject: [PATCH] Tweak glyph caching parameters to increase performance. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16330 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/GSHorizontalTypesetter.m | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e0548a74..150f36633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-02 15:26 Alexander Malmberg + + * Source/GSHorizontalTypesetter.m: Tweak glyph caching parameters + to increase performance. + 2003-04-01 Willem Rein Oudshoorn * Source/NSMenuView.m (NSMenuWindowTitleView): reformatted one line to diff --git a/Source/GSHorizontalTypesetter.m b/Source/GSHorizontalTypesetter.m index 37ca05dea..01711b2b8 100644 --- a/Source/GSHorizontalTypesetter.m +++ b/Source/GSHorizontalTypesetter.m @@ -83,6 +83,10 @@ static GSHorizontalTypesetter *shared; } +#define CACHE_INITIAL 192 +#define CACHE_STEP 192 + + typedef struct GSHorizontalTypesetter_glyph_cache_s { /* These fields are filled in by the caching: */ @@ -470,7 +474,7 @@ Return values 0, 1, 2 are mostly the same as from [self _cacheMoveTo: curGlyph]; if (!cache_length) - [self _cacheGlyphs: 16]; + [self _cacheGlyphs: CACHE_INITIAL]; if (!cache_length && at_end) { /* @@ -663,7 +667,7 @@ restart: newParagraph = NO; break; } - [self _cacheGlyphs: cache_length + 16]; + [self _cacheGlyphs: cache_length + CACHE_STEP]; if (i >= cache_length) { newParagraph = NO;