Performance->Memory Usage

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

luigbi
User
Posts: 2
Joined: Mon Sep 28, 2009 9:38 pm

Performance->Memory Usage

Post by luigbi »

Hi, we are trying to programmatically SET the amount of RAM consumed by the ActiveX while caching/scrolling pages.

We tried with:

AxPdfXchange.SetProperty("Performance.MemUsage","1%",0);

BUT the new value doesn't get applied and the memory usage still goes way over 1%.

After the above command is executed, if we go to Menu->Preferences->Performance we can see the new value in place, however the memory usage is not affected by the new value!

Instead, all seem to be working fine only when we change the MemoryUsage value through the actual UI Menu and click on "apply" or "ok".

Does anyone know how to APPLY these changes programmatically as described above?
Thanks for helping!
Luigi
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Performance->Memory Usage

Post by Vasyl - PDF-XChange »

Hi, luigbi.

The problem is reproduced and will be fixed in the next build (new build will be early next week). Thanks for your report.
And small bonus for you:
1. to set mem usage exactly, in MB (new feature, undocumented):
// disable percents mode
AxPdfXchange.SetProperty("Performance.UseMemExact", "true", 0);
// set 100MB limit:
AxPdfXchange.SetProperty("Performance.MemExact", 100, 0);
2. to set mem usage in percents of total mem (as you wanted):
// enable percents mode, it can be disabled previously in case 1
AxPdfXchange.SetProperty("Performance.UseMemExact", "false", 0);
// set 1%:
AxPdfXchange.SetProperty("Performance.MemUsage", "1", 0);

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
luigbi
User
Posts: 2
Joined: Mon Sep 28, 2009 9:38 pm

Re: Performance->Memory Usage

Post by luigbi »

Thank you Vasyl,
Currently we are using an older version that only supports memory allocation setting by %. We found a work-around by saving the settings and reload them programmatically right after we set the memusage property to "1%" and it worked. (I will post the code if someone needs it). I don't know if there is a better way to apply the changes immediately.

We tried to switch to latest ActiveX version but we ran into some incompatibly issues while loading and applying Annotations to a pdf. This is indeed the reason why we are still using an older version. Perhaps this will be a new topic in a different forum area.

Thanks again for your prompt feedback!
Luigi
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Performance->Memory Usage

Post by Corwin - Tracker Sup »

Hello Luigi,

What exactly problems do you get when applying annotations to pdf?
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Performance->Memory Usage

Post by Vasyl - PDF-XChange »

Hi, Luigi.

The bug with applying of "MemUsage" will be fixed in the next build. Please wait some days...
We tried to switch to latest ActiveX version but we ran into some incompatibly issues while loading and applying Annotations to a pdf
Please supply specific details regarding the problems encountered as soon as possible - so we can reproduce and resolve in new upcoming build..

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.