diff --git a/include/decl.h b/include/decl.h index 70727a2bf..a58ae77d4 100644 --- a/include/decl.h +++ b/include/decl.h @@ -344,6 +344,7 @@ struct instance_globals_d { /* new */ boolean deferred_showpaths; char *deferred_showpaths_dir; + boolean disable_glyphid_cache_prefill; boolean havestate; }; diff --git a/src/decl.c b/src/decl.c index 4fe4585f0..02cfa5f2d 100644 --- a/src/decl.c +++ b/src/decl.c @@ -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 */ diff --git a/src/options.c b/src/options.c index 0bb1b4b29..80518ea66 100644 --- a/src/options.c +++ b/src/options.c @@ -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 */