Details
-
Type: Improvement
-
Status: Closed
-
Priority: Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.2
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:Embedded ICEpdf component in a large application
-
Assignee Priority:P1
-
ICEsoft Forum Reference:
Description
We have had a couple requests for the ability to set the max memory limit of the library. Currently we use Runtime.getRuntime().maxMemory(); which is ok for the standalone Viewer RI but not so great when you use the viewer component in a larger application and want to limit the amount of memory ICEpdf uses.
Simple to address, create a new system property org.icepdf.core.maxMemory and use Runtime.getRuntime().maxMemory(); as a default value.
Simple to address, create a new system property org.icepdf.core.maxMemory and use Runtime.getRuntime().maxMemory(); as a default value.
I wanted to try and quantify the saving of being a little more proactive about when we flush pages as well as clearing the library ref cache programatically. When comparing memory usage between 4.1.4 and the trunk the results are about the same, the memory manager system properties do what they say they do.
However when you look at time spent doing Garbage Collection the differences quickly become apparent. 4.1.4 spends between 60 and 70 percent of the time doing collection. Where the trunk spends 10 and 30 percent doing collection. This difference can really bee seen when scrolling though a large documents, the trunk feels a lot snappier.
Closing issue.