Right now, if we call XmlDoc::parseMathML(), the first thing we do is to uncompress the XHTML+MathML+SVG DTD and then call std::string::c_str() and reinterpret_cast it to const char *. Clearly, we could do this once and that is it. FWIW, I have just checked how long it takes to do the aforementioned and it takes ~15ms on my computer. For the Fabbri et al. model, this means that we waste more than half a second by just parsing the MathML.
Right now, if we call
XmlDoc::parseMathML()
, the first thing we do is to uncompress the XHTML+MathML+SVG DTD and then callstd::string::c_str()
andreinterpret_cast
it toconst char *
. Clearly, we could do this once and that is it. FWIW, I have just checked how long it takes to do the aforementioned and it takes ~15ms on my computer. For the Fabbri et al. model, this means that we waste more than half a second by just parsing the MathML.