Juergen Spitzmueller wrote: > It seems the behaviour was changed by André on 2004-04-13 during a major > macro rewrite.
The attached patch restores the behaviour of 1.3: initMath() is not called on startup, but the first time a math inset is being inserted (or when a document with math insets is loaded, respectively). I'm not sure if this is the best approach, and it needs some testing. I just tested if symbols like \alpha are being displayed. Anyway, I think that initializing the whole math machinery during startup is a big annoyance for all users who actually never need it, as long as it consumes this amount of time. I also thought about invoking initMath() at the end of the startup, but in the background (asynchronously), which would probably be the most elegant way. I don't know if this is already possible, though, and how. Furthermore, we could of course try to speed up getSymbolFont :-) What do you think? Jürgen
Index: lyx_main.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v retrieving revision 1.212 diff -p -u -r1.212 lyx_main.C --- lyx_main.C 17 Jul 2005 12:39:54 -0000 1.212 +++ lyx_main.C 10 Dec 2005 11:47:12 -0000 @@ -230,7 +230,7 @@ void LyX::priv_exec(int & argc, char * a if (want_gui) lyx_gui::parse_lyxrc(); - initMath(); + //initMath(); vector<string> files; Index: mathed/math_hullinset.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_hullinset.C,v retrieving revision 1.183 diff -p -u -r1.183 math_hullinset.C --- mathed/math_hullinset.C 1 Dec 2005 10:28:50 -0000 1.183 +++ mathed/math_hullinset.C 10 Dec 2005 11:47:17 -0000 @@ -143,6 +143,7 @@ MathHullInset::MathHullInset() //lyxerr << "sizeof MetricsInfo: " << sizeof(MetricsInfo) << endl; //lyxerr << "sizeof MathCharInset: " << sizeof(MathCharInset) << endl; //lyxerr << "sizeof LyXFont: " << sizeof(LyXFont) << endl; + initMath(); setDefaults(); } @@ -151,6 +152,7 @@ MathHullInset::MathHullInset(string cons : MathGridInset(getCols(type), 1), type_(type), nonum_(1), label_(1), preview_(new RenderPreview(this)) { + initMath(); setDefaults(); }