methods of disabling glyphid cache prefill
Two methods are now provided for slow ports/platforms that
need to do this for performance reasons.
Hopefully, this will avoid proliferation of more platform-specific
conditional code within initoptions_init().
Method (1): #define DISABLE_GLYPHID_CACHE_PREFILL in platform/OS's
include/*conf.h.
or
Method (2): set gd.disable_glyphid_cache_prefill = TRUE in startup code
after decl_global_init(), and prior to initoptions_init().
It has to be done after decl_global_init() because
decl_global_init() sets the value to its initialization
default.
This commit is contained in:
@@ -344,6 +344,7 @@ struct instance_globals_d {
|
||||
/* new */
|
||||
boolean deferred_showpaths;
|
||||
char *deferred_showpaths_dir;
|
||||
boolean disable_glyphid_cache_prefill;
|
||||
|
||||
boolean havestate;
|
||||
};
|
||||
|
||||
@@ -313,6 +313,7 @@ static const struct instance_globals_d g_init_d = {
|
||||
FALSE, /* decor_levitate_override */
|
||||
FALSE, /* deferred_showpaths */
|
||||
NULL, /* deferred_showpaths_dir */
|
||||
FALSE, /* disable_glyphid_cache_prefill */
|
||||
TRUE, /* havestate*/
|
||||
};
|
||||
|
||||
@@ -1184,6 +1185,9 @@ decl_globals_init(void)
|
||||
|
||||
gu.urole = urole_init_data;
|
||||
gu.urace = urace_init_data;
|
||||
#ifdef DISABLE_GLYPHID_CACHE_PREFILL
|
||||
gd.disable_glyphid_cache_prefill = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* fields in 'hands_obj' don't matter, just its distinct address */
|
||||
|
||||
+3
-2
@@ -7151,8 +7151,9 @@ initoptions_init(void)
|
||||
gc.cmdline_windowsys = NULL;
|
||||
}
|
||||
|
||||
/* make any symbol parsing quicker */
|
||||
if (!glyphid_cache_status())
|
||||
/* make any symbol parsing quicker, but only if
|
||||
* gd.disable_glyphid_cache_prefill is not set to TRUE */
|
||||
if (!glyphid_cache_status() && !gd.disable_glyphid_cache_prefill)
|
||||
fill_glyphid_cache();
|
||||
|
||||
/* set up the command parsing */
|
||||
|
||||
Reference in New Issue
Block a user