Aspose JAR file size

Hi - we are customers of Aspose.Words and this jar range in size is 14M. In some scenarios, we need to package a version of our product that has to be very sized constrained and the Aspose jars are easily 90% of the total image size (they total 170M), despite our product using many other third-party jars. We use other Aspose APIs as well.

I believe Aspose uses some form of C# -> Java converter/handler in their Jars and this is responsible for the large sizes. Is it possible for this “converter” to be in a single jar that all these jars can share to reduce the size?

The sizes you see below are simply gigantic for JAR files and is a real problem.

-rw-r–r-- 1 sits sits 26M Dec 15 21:13 aspose-cad-19.5.jar
-rw-r–r-- 1 sits sits 7.1M Dec 15 21:13 aspose-cells-19.10.jar
-rw-r–r-- 1 sits sits 3.3M Dec 15 21:13 aspose-diagram-19.6-jdk16.jar
-rw-r–r-- 1 sits sits 13M Dec 15 21:13 aspose-email-19.10-jdk16.jar
-rw-r–r-- 1 sits sits 24M Dec 15 21:13 aspose-imaging-19.10-jdk16.jar
-rw-r–r-- 1 sits sits 11M Dec 15 21:13 aspose-note-20.7-jdk17.jar
-rw-r–r-- 1 sits sits 68M Dec 15 21:13 aspose-pdf-20.7-jdk17.jar
-rw-r–r-- 1 sits sits 30M Dec 15 21:13 aspose-slides-21.2-jdk16.jar
-rw-r–r-- 1 sits sits 14M Dec 15 21:13 aspose-words-19.11-jdk17.jar

I’ve seen this topic has been raised before. Can Aspose take this on?


This Topic is created by asad.ali using Email to Topic tool.

Hi, @nuix

We are currently considering adding additional repackaging configuration that could reduce the size of the Aspose.Words for Java library. This task is logged as WORDSJAVA-2666. We will keep you informed and let you know once it is resolved. Thank you for your feedback.

Hi - that is great to hear about Aspose.Words, but what about all the other Aspose jar files I listed above?

@nuix I have moved this post in Aspose.Total forum so my colleagues from other teams can reply you.

@nuix,

See the reply in your other thread regarding other Aspose APIs (JARs) for your reference.

@nuix,
Unfortunately, it is not possible to use the Aspose.Slides library with a smaller size yet. But some optimizations have already been planned to significantly reduce the library size. The tentative ETA is version 22.7. This version will be released in July 2022. I linked this forum thread to an appropriate task with ID SLIDESJAVA-38755 in our issue tracking system. You will be notified when the issue is resolved.

Are there any updates on this?

Would it be possible to extract out the common .net runtime parts of each jar into a shared jar? E.g. many of the Aspose classes have a copy of bouncy castle bundled in the jar, instead of referencing a shared version:
image.png (203.3 KB)

Another example is all of this duplicated System.Xml classes:
image.jpg (316.0 KB)

If the .net libraries were in a shared spot then it would reduce a lot of duplication in the jars. It’s not really an Aspose Words or Aspose Slides issue, but a more broad issue with the whole Java suite.

@nuix,

For Aspose.Slides, we have logged internal tickets to clean up processes and modules, such as removing unused code from the library. We will also replace static autogenerated parsers with a dynamic parser to reduce the size. The issues have not been resolved yet. Once we have updates, we will let you know.

Hi Amjad,

It is a bit of a bigger issue than just extra parsers in the Slides jar. Each jar seems to be packing its own copy of various .net DLLs, e.g. System.Xml, System.IO, etc. Could you please check whether it would be possible to share those common classes?

Thanks

@nuix,

It appears you would like all our Aspose products to be packaged using a single JAR file for some shared code. Unfortunately, it is difficult to package a common JAR file because the Aspose products are developed completely independently, the libraries are not dependent to each other. We have no plan to do that.

Anyways, for Aspose.Cells, we will try to reduce the JAR file size (if possible). We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-46013

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.