Hello,
I’ve got a problem with methods containing controller.loadRecords to retrieve related data running on PC Win (XP and Vista) : This controller is very very slow.
I tried to run the same solution with the same method on a Mac and on Linux and is about 10 time faster with quite the same hardware config.
So I tried to run Servoy server on PC and run the solution with servoy client on a Mac and it is perfect.
So I was pretty sure the problem came from Java : my PC run under Vista with Java 6. I thought Java 6 could be a problem with Servoy, so I install JDK 5.0 and it is still the same.
To be sure I tried to run my solution with another db engine : tried MySQL and Sybase, and the problem is still the same.
Here are the config : PC : Core 2 duo 2 Ghz -
Go RAM Servoy 3.1.3 / Mac : Core Duo 1.8 Ghz - 2 Go RAM Servoy 3.1.3
Did you have a look at the performance statistics?
http://localhost:8080/servoy-admin/performance
Does this show slow queries?
What is strange is that it’s look like to be normal (the longuest method take 110 ms) . But in the same time on client part I’ve got “the waiting wheel” for approx. 20 sec.
Any idea ?
Hi,
sounds like Servoy is loading some calculated or related fields. Create a new layout without them to confirm this is the problem.
Yes, there is some calculated and related fields. I use the controller to retrieve data from related tables.
But what I can’t explain, is that the same solution with exactly the same tables and method works perfectly well on Mac or Linux as server…
After checking a little bit more this problem, it appears that it is just the first time I lauch the different forms after satrting the solution that this problem appears. After using one time each forms everything is going well, even if I create new records, delete or edit.
Could it be a problem of cache memory?
I see this kind of problem once in a while. Can you confirm that while “you are waiting” for data, the CPU load is at 100%? Once the CPU goes down, your data is there. The problem is that not all data is there when you see the form…
You can also “pre-load” your forms up front - so the user experience is “instant” once everything loads.
You can just make a form with a jprogress bar on it (WARNING: Won’t work in Web Client) - then have a method that does this:
//pre-load the form into cache
forms.formName01
//update progress bar
forms.formName02
...etc...
Hope this helps.
Thanks for those anwsers.
Patrick : you are right, while data are loaded cpu is at his maximum and goes near 0% usage once everything is laoded.
Bob: I will try to do this. Do you think this could be done as an open method?
Yes, do this as part of your startup.
You CAN do it in the web client, but not with the JProgress bean as I mentioned before - you would just make a HTML area and set the width of a graphic to longer and longer to simulate the progress bar…