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
This commit is contained in:
alexm 2003-04-02 13:28:29 +00:00
parent 99a69e9446
commit 619c1f0b45
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-04-02 15:26 Alexander Malmberg <alexander@malmberg.org>
* Source/GSHorizontalTypesetter.m: Tweak glyph caching parameters
to increase performance.
2003-04-01 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
* Source/NSMenuView.m (NSMenuWindowTitleView): reformatted one line to

View file

@ -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;