-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Math conversions are really slow #144
Comments
@skalee we have copied of the 'fake math conversion' code to here: And this is probably time to extract out this 'fake math conversion' functionality to a separate gem under the Plurimath umbrella. Can you help with that? Thanks. |
@ronaldtse Sure. Please add me to plurimath organization then. How to name that gem? Fake Math? HTML Math? Also, can I assume that things under stepmod-utils are more up to date and feature-complete? |
Since I wasn't adding anything in iev-data yet, that's probably true. Stupid question from me. |
The only changes were metanorma/stepmod-utils@d8f3e17. |
Profiling revealed that
TermBuilder#mathml_to_asciimath
andTermBuilder#html_to_asciimath
which are called from several places take 51% of total concepts generation time (see attachment), mostly due to their use of Nokogiri (41% of total).I suspect that even simple regular expression test on presence of MathML/HTML tags so that content without math is not processed will make a huge difference. Furthermore, replacing Nokogiri with something else can make a difference too.
The text was updated successfully, but these errors were encountered: