When I run the Servoy client it runs out of memory. This is particularily a problem when I run methods that print graphics. Even when it does not freeze up I note that the client begins to run very slowly when 65 MB of memory is allocated and >53 MB of memory is being used.
Can the client be set to access more memory?
Can Servoy client be changed to use available memory better or to clear the cache when it is running out of memory?
John McCann
Servoy Developer
Version R2 2.0.2-build 275
Java version 1.4.2_04-b05 (Windows XP)
MS SQL Server
As an example I see the problem when I try to print out a form that has four 320 x 240 thumbnails displayed on labels of slightly smaller dimension. Even this is a comprimise as I would like to be able to display the same size labels with high resolution JPEG images at 600 dpi. Any idea when 2.1 might come out?
I’m evaluating Servoy and I have also noticed that the client maximum ram consumption is about 90-95Mb.
I’m planning to build a large solution (1500 forms or more) and I’m worried about the fact that I can hang the client at will.
This is what I do: I’ve created a solution with a form (with about 20 fields) and duplicated that form 500 times. Then I opened the solution in a good PC with 1GB of ram. Then using the “choose form” dialog I selected one for after an other in an attempt to simulate a user working during a full day. After having selected clicked on 200 forms the client becomes unresponsive and they hang.
This makes me wonder if Servoy is apt to manage a solution with 1500+ forms.
I can overflow memory simply by displaying many forms as well. The Servoy team has done a great job of adding functionality to the development environment. It sounds like in the next releases some of the stability issues will be adressed. They have always come through, so I am keeping the faith.
i will test youre method also but this is very strange because we already flush out forms that are not used for a while so if you are have 1000 forms and you are going from 1-> 1000 then when you open number 36 number 1 will be flushed out. (and if you open 37 number 2 will be flushed out and so on and so on)
I will also make a simpel form and duplicate it 500 times and load that one in the client and look at the mem usage.
idoctor: you use large images and yes that is a problem that we or sun will fix in the next relase of java. Because it is a simple fact that images of 1600x1200 will take at least 7.6MB each..
2.1 will have an option to increase the mem a client can use.
the mem leak is fixed for version 2.0.4 and greater.
Please retest with 2.0.4 or 2.1beta when we will release those, to make sure youre mem problems are fixed.
I have not seen a problem with memory over flow when I display a single image of 1600 x 1200 pixels. The problem is that it can take as long as 15 minutes to display such an image; this makes it impractical to generate thumbnails for the large images!! An image of 800 x 600 pixels displays in a few seconds. To me this seems like a bug. I hope the Servoy team can look into this and if possible adress it in verson 2.1.
I see the problem with memory overflow when I print forms that contain four 320 x 240 pixel images. I estimate these four images should use about 1.2 MB total. I don’t understand why they cause Servoy to sudenly need >30 MB more of memory to print. I hope this is one of the things that can be fixed in verson 2.1.
because it needs quite a lot of decoding but most of all it is very memory consuming.. 1600x1200 kost almost 8M only to get the image in mem.
for example a 500KB jpg file of 1600x1200 will expand to almost 8M in mem because the jpg is converted to a bitmap first before it can do something with it.
if you just look how many records you can hold in youre memory for a moderate table for just what one image takes.. that is enormous.
yes but a picture of 1600x1200 or even bigger doesn’t say anything more on a screen resolution people are using today (1280x1024 or 1024x768 maximized!)
Of course with printing ect the story is different.
i will try to optimize it also further in media_field if you set shrink/enlarge to fit. I will try to optimize the load so that even large picture are when loading already converted to the size they are painted.
The new way of making thumbnails and faster display of large fullsize images are great ideas. I look forward to testing them out in a future release of Servoy.
displaying full size images won’t get much faster i am afraid.
for example the image you send to the forum 2000x1500 if you display that one really full size, zo in a scrollpane with scrollbars with no resizing at all. Then i don’t think i can optimze that much better at the moment
What i can optimize is when you want to display such a large images in a place say 500x400. So scaling it down. Because then i can do the same things like i do now if i create a thumbnail (the thumbnail is then just bigger)
This works for me. I will continue to save the fullsize image as an archived image. When in the Servoy environement or printing, I will display a thumbnail. I can still launch my application with these limitations. Hopefully in the future (Servoy 3.0?) we will have a way to place high resolution images to take advantage of printer resolution.
I am still having problems with the client and the developer running out of memory. For instance if I set up a method that uses the new createthumbnail command to process a bunch of forms it will make about 200 thumbnails and then it runs out of memory. Trouble is I need to make 80,000 thumbnails and this is just one on many examples of the memory problems in Servoy. Can’t you put something into Servoy that tells it to dump the junk in the cache when say 90% of the available memory is used up? I am sure this is an oversimplification of a difficult task but it is a real problem that needs to be tackled.
John McCann
Servoy Developer
Version R2 2.1beta2-build 300
Java version 1.4.2_04-b05 (Windows XP)
MS SQL Server 2000