We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words Java MathML conversion very slow

I am using the code in the following post to convert math equations in OfficeMath to MathML.

In my sample word doc, each equation takes between a quarter to a half second to convert. For a document with 20 the running time is more than 5 seconds.

Is there a way to speed up the conversion?

All equations are very simple. Here are a few examples in MathML.

  <mi mathvariant="bold-italic">D</mi>
  <mfenced separators="|">
      <mn mathvariant="bold-italic">3</mn>
      <mo mathvariant="bold-italic">,</mo>
      <mn mathvariant="bold-italic">10</mn>



Have you also tried the latest (21.9) version of Aspose.Words for Java on your end? In case the problem still remains, then please ZIP and upload your source Word document (you are getting this problem with) here for testing. We will then investigate the issue on our end and provide you more information.

Thanks for the quick response. Yes I am already on the latest version 21.9.

I will upload a simple word document with 20 fractions and a Java problem showing the operation I intend to do.

In the Java test, running through the 20 fraction equations takes about 10 seconds.

omath.zip (10.7 KB)


In this case, the problem simply occurs because you are using Aspose.Words for Java in evaluation mode. Please first apply license before you start Document processing:

public class AsposePerfTest extends DocumentVisitor {
    public static void main(String[] args) {
        try {
            License lic = new License();
        } catch (Exception ex) {

        InputStream inputStream = AsposePerfTest.class.getResourceAsStream("/OMath2MML.docx");
        long start = System.currentTimeMillis();
        try {
            Document doc = new Document(inputStream);

After applying a license the performance issue was resolved. Thank you for the help!

1 Like