cellml / libcellml

Repository for libCellML development.
https://libcellml.org
Apache License 2.0
16 stars 21 forks source link

XmlDoc: might want to uncompress the XHTML+MathML+SVG DTD once #973

Closed agarny closed 2 years ago

agarny commented 2 years ago

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.