Problem with memory increasing in client

Hi
I’ve a problem with memory usage in client.
I’ve a process that generate five .txt files, each one of 25MB and then, with Jasper Plugin, I print a .pdf of 6MB.
I can’t understand why Servoy don’t deallocate memory between each file and before the Jasper print.
At the top of process the usage of memory is 176Mb, after the generation of the first .txt is 248 Mb, after the 2nd is 300Mb, after the 3rd is 345 Mb, after the 4th is 400 Mb and after the last is 430 Mb.
The usage of memory is approximately regular for each file, but I can’t understand why after each file the memory will not go down. At this point the memory usage is 430 Mb, the thread call Jasper Plugin for a massive print and after this operation memory go up until 750 Mb and after the print ( and when the process is end ) the memory don’t go down until 170/180 Mb.
In this program I don’t force garbage collector ( as I’ve read on forum, because Servoy itself provide this function ).
I use Servoy 5.2.11, Java 1.6.0_22 and Jasper Plugin version 3.2.0.
servoy.maxClientHeap is 512, like the memory dedicated on server.
Any idea about improve my program??
Sorry for my experimental english, but I’m going out of mind with this problem. :?: :?:
Thank for help

Use the virtualizer setting of the jasper plugin!

Great harjo, great tips!!
The last answer… if you help another time me I’m really happy!

I’ve found this example:
vParameters.put(‘VIRTUALIZER_TYPE’, “gZip”); //possible options: file, swapFile, gZip
and I’ve read that there are difference beetween the three options. I’ve notice that file generate a lot of file in temp folder, gZip ‘compress’ file in memory; swapFile is like file but is better for large files, it’s true? There are others parameters that I’ve to pass if I use ‘swapFile’ for improve the process?

Thanks! :D :D

I’m only using this:

	var vParameters = new java.util.HashMap(); //object
	vParameters.put('VIRTUALIZER_TYPE', "gZip"); //possible options: file, swapFile, gZip
	vParameters.put("PAGE_OUT_DIR", plugins.it2be_tools.server().getApplicationServerDir() + '/server/work/');

but be aware, the new opensource version of the it2be_tools plugin has removed the function: getApplicationServerDir() for some reason)
So if you don’t want to use that plugin, please provide a fixed path there…

and also fiddle around with swapFile, file en gZip, and see what works best for you :-)

According to Servoy the function ‘getApplicationServerDir()’ was a security threat…

Wow, a directory name as a security threat ! I may hope that a Servoy directory on a public app server is somehow better protected then being stealth…

Removing this function is imho a kind of overkill for the well known security threats out there.

I would be happy to see some opinions on this on this forum.

Regards,

Harjo:
I’m only using this:

	var vParameters = new java.util.HashMap(); //object
vParameters.put('VIRTUALIZER_TYPE', "gZip"); //possible options: file, swapFile, gZip
vParameters.put("PAGE_OUT_DIR", plugins.it2be_tools.server().getApplicationServerDir() + '/server/work/');



but be aware, the new opensource version of the it2be_tools plugin has removed the function: getApplicationServerDir() for some reason)
So if you don't want to use that plugin, please provide a fixed path there....

and also fiddle around with swapFile, file en gZip, and see what works best for you <img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" />

Thanks Harjo for your help and for the information about it2be_tools removed function ( because we used getApplicationServerDir() sometimes)