Unable to convert 30mb docx to PDF in 6gb memory

Hi,
I have a 30mb docx file and converting only the first 5 pages to PDF but its taking very long time. Below are my system details.

Groupdocs viewer: 21.2
Java: 8
CPU : Intel 7th Gen 4 core
Memory: 16gb
Java Heap: 6gb
Attachment: Loading Google Docs

@shiva.k

We’ll check the file and update you.

Hi,
Is it reproducible in your end?

@shiva.k

We have logged this issue in our internal issue tracking system. Your investigation ticket ID is VIEWERJAVA-3159. We’ll notify you in case of any update.

Hi, @shiva.k

I have investigated the issue using next Java parameters: -Xms512m -Xmx6g and the licensed GroupDocs.Viewer for Java v21.2.
For testing, an empty Maven project with the exec-maven-plugin was used. The project was run using the command mvn clean compile exec:java. The Java version used is 1.8.0_361.
For all pages processing took 08:06 min, while for 5 pages it took 03:04 min.
Here is a project (16.0 KB) so you can check the results yourself. It’s possible that the issue may lie in the project where GroupDocs.Viewer is being used or in its interaction with other libraries.
Running the sample with less than 6Gb memory in some cases leads to an out-of-memory error. Despite processing only 5 pages, GroupDocs.Viewer still needs to load and analyze the whole file. We are working on improving performance, but it is not the primary goal at the moment.
Feel free to contact us in case you have any problems or questions.

Best regards,
Oleksii