Im in the processes of evaluating Aspose to be used in the product.
Hi there,
Thanks for your inquiry. It is quite difficult to answer such
questions because CPU performance and memory usage all depend on
complexity and size of the documents you are loading/generating.
terms of memory, Aspose.Words does not have any limitations. If you’re
loading huge Word documents into Aspose.Words’ DOM, more memory would be
required. This is because during processing, the document needs to be
held wholly in memory.
The process of building layout model is
not linear; it may take a minute to render one page and may take a few
seconds to render 100 pages. Also, Aspose.Words has to create APS (Aspose Page Specification)
model in memory and this may again eat some more time for some
documents. Rest assured, we’re always working on improving performance;
but, rendering will be always running slower than simple saving to flow
formats (e.g doc/docx).
Hi Tahir,
Hi there,
Thanks for your inquiry. There is nothing to initialize at server.
Perhaps, at your server the fonts are missing which may take some time
for font substitution.
Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PDF or XPS). Make sure you have all the Fonts installed on your machine you’re using to convert Word document to Jpeg format. I would suggest you please read the
following article:
http://www.aspose.com/docs/display/wordsjava/How+Aspose.Words+Uses+True+Type+Fonts
Please read about system requirements from here:
http://www.aspose.com/docs/display/wordsjava/System+Requirements
Hi,
I tried to add callback to handleDocumentWarning using an example i found on the site and I did not find any fonts missing.
Any other suggestions to improve the performance of the initial loading.
HandleDocumentWarnings callback = new HandleDocumentWarnings();
ImageSaveOptions options = new ImageSaveOptions(com.aspose.words.SaveFormat.JPEG);
ByteArrayOutputStream dstStream = new ByteArrayOutputStream();
options.setPageIndex(pageNumberInsideFile - 1);
options.setPageCount(1);
options.setWarningCallback(callback);
—
public class HandleDocumentWarnings implements IWarningCallback {
/** The Constant LOGGER. */
private static final Logger LOGGER = LoggerFactory.getLogger(HandleDocumentWarnings.class);
/**
* Our callback only needs to implement the “Warning” method. This method is called whenever there is a potential issue during document procssing. The
* callback can be set to listen for warnings generated during document load and/or document save.
*/
public void warning(WarningInfo info) {
// We are only interested in fonts being substituted.
if (info.getWarningType() == WarningType.FONT_SUBSTITUTION) {
LOGGER.info("Font substitution: " + info.getDescription());
}
}
}
Hi there,
It
is quite difficult to answer such questions because CPU performance and
memory usage all depend on complexity and size of the documents you are
loading/generating.
Hi there,
I have executed the shared code at Tomcat 8, Java 8, Windows 7 (64 bit), 8 GB Ram. Following are the results at my end.
Execution time, first time: 1280 ms
Execution time, second time : 312 ms
Execution time, third time : 196 ms
Execution time, fourth time : 168 ms
I have created a Java code example which load and save the document twice at Windows 7 (64 bit), 8 GB Ram and Java 8. Following are the results at my end.
Execution time, first time : 1743 ms
Execution time, second time : 282 ms
In both cases, the results are approximately same. Please test the same scenario at some different systems (using Tomcat and simple Java application).
danros:
The point I am trying to make is when i run the same file thru your demo on the same box I get much faster results than on my server (Tomcat 8, Java 8).
I suggest you please create a separate simple Java application to test this scenario. If you have any other jar files, please remove these jar files and check this scenario again. You may share these jar files with us for further testings. Please let us know if you have any more queries.
Hi Thanks for the response.
Hi there,
Thanks for your inquiry. I used the apache-tomcat-8.0.23 for testing. I have not set any configuration at my side. I used apache-tomcat-8.0.23 with default configuration. I will test the same scenario using apache-tomcat-8.0.14 at my side and share my findings here for your reference.
Hi,
mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:
EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>Execution time: 5130
milliseconds. Is it possible to zip up your tomcat and code , I can compare and see how its different from mine.
Hi there,
Thanks for your inquiry. I have tested the same scenario using apache-tomcat-8.0.14, Java 8, Windows 7 (64 bit), 8 GB Ram. Following are the results at my end.
Execution time, first time: 14147 ms
Execution time, second time : 268 ms
Execution time, third time : 198 ms
It seems that the issue is with older version of apache-tomcat-8.0.14. The same version of Aspose.Words for Java 15.4.0 works good at apache-tomcat-8.0.23.
danros:
On Tomcat 8.0.23 I see Execution time: 5130 milliseconds. Is it possible to zip up your tomcat and code , I can compare and see how its different from mine.
I have attached the code example (.jsp file) with this post for your kind reference. Please download apache-tomcat-8.0.23 from here:
https://tomcat.apache.org/download-80.cgi
Please let us know if you have any more queries.