I built a viewer on my application using GroupDocs.Annotations. For now, it will be used only for viewing, but later to draw and save annotations.
I'm testing some features opening PDF files:
- Cache eficiency
- On-demand page loading
- Memory and CPU usage on client (browser) and server
I'm facing some problems and want to resolve it. I created a simple viewer which has a base path (directory) with some PDF files. Inside this directory I have the 'cache' directory, which is the cache path for GroupDocs. My application will manage almost always PDF files, which can have up to 500 pages, most of them with text inside.
I tried to open the PDF file attached to this message. It is a file with many pages (1008), but it isn't heavy (1.7MB). On the PC at my workplace it opens after a while (about 20-30 seconds), but at my PC at home when I try to open it on Google Chrome or Firefox the browser crashes. My PC at home have 16GB of RAM, running on Eclipse IDE with 1.5GB for the JVM. The PC att my workplace has 6GB of RAM.
I uploaded this file on the sample app viewer at https://apps.groupdocs.com and noted that while the file has only 1.7MB, the network tab on F12 menu at Google Chrome registered a download of more than 17MB (image attached). The memory and CPU consumption to view the file for the first time were huge, too (image attached).
Questions:
- How to manage memory with GroupDocs? Is it always heavy (memory and CPU consumption) to load PDF files on first time?
- How to tweak the performance with caching?
- How to view PDF files with many pages avoiding crashes on the browser?
I forgot to ask: how to configure how many pages are loaded
- when opening the PDF for the first time?
- after and before the current page I’m seeing on the viewer (preview pages)?
Thank you.
Hello Rafael,
Thank you for your inquiry.
Yes, we know that we have some problem with opening such files with a lot of pages, but we make utmost that fix the issue in our next versions of this product.
For this version of the GroupDocs.Annotation for Java you can configure the preloadPagesCount parameter in the application.properties file, to preload some pages for viewing.
Also, our next version of the Annotation, that will be released very soon, should include some improvement with speed of load of the documents. In new version also will be implemented some functionality for work with cache and you will be able to configure it independently.
If you will have more questions please feel free to contact us.
-------
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Hi, Evgen.
This parameter ‘preloadPagesCount’ load X pages before and X pages after the current page?
Can you tell me when this next version of GropuDocs will be released? In a few months? Until the end of this year? If the company I work for buy a license we’ll have access to this next release?
Thank you.
Hello Rafael,
Thank you for you inquiry.
The parameter "preloadPagesCount" loads only X pages, before the Viewer loads all pages.
About new release - we plan to release our new version of the GroupDocs.Annotation for Java next month and yes, if you buy the license for this product, then you will be able to use it for all our new versions throughout the year.
If you will have more questions please feel free to contact us.
------
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Hi, Evgen.
The new version of GropuDocs.Annotations is 2.0.0?
I will download an install it on my application.
Is there a ‘release notes’ file or page where I can see what are the new features/improvements? And what about the cache and page loading configuration, what can I do now and how to configure it?
Do I need to delete the cache after deploy this new version of GroupDocs.Annotations? We have a production server running our app on a Wildfly for more than two weeks.
Hello Rafael,
Thank you for your inquiry.
Yes, our new version of the GroupDocs.Annotation for Java is 2.0.0 and you can check all release notes
here .
Also to configure cache you can use
CacheDataHandler class, that extends from Web API. Please investigate a documentation for how to work with this handler
here . If you will configure this handler, then you should delete all your previous cache files from cache folder.
Configuration of pages was not changed and you still can use "preloadPagesCount" parameter.
If you will have more questions please feel free to contact us.
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+