Page 1 of 1

Speed Up Servoy Performance (Client + Server)

PostPosted: Tue Mar 30, 2021 12:19 pm
by s.liebig
Hello developers,

I just searched the whole forum and unfortunately I didn't find a matching post to my problem.

We currently have the problem that the clients are very slow. Our program is constantly growing and this is getting worse.

Is there any way to speed up the performance of the clients or even the application server? Currently even a print takes several minutes, although very little data is calculated.
Likewise, our largest function takes about 10 minutes to 5 hours, depending on how many records are calculated.
Some customers are complaining that the program is getting slower and slower.

We have already increased the memory for all JVM's (server and client) but without success. The program remains slow. We have also cleared the Java cache, which has also not led to any satisfactory result.

Are there any other possibilities to work with? Has anyone had any experience in this matter?

We urgently need help to increase the speed of the program.

Comparable software need only a fraction of what our software needs.

We are happy about every suggestion we get.

With collegial greetings
Dmitrij Wanscheid - HV-Office

Re: Speed Up Servoy Performance (Client + Server)

PostPosted: Sun Apr 04, 2021 11:19 pm
by swingman
Hi Dmitrij,

Since you talk about JVMs on the client side I assume you are on Smart Client.

There are some older frameworks where all the main screens are tabs on a single form, so when the system grows this causes a lot of loading of forms and data at startup.
By moving the base-screens onto separate forms sharing a common menu panel the app load will much faster.
Use the database performance tab to understand whether your database needs more indexes. An index in the right place can speed up queries dramatically.
If you use table events, put in debugging messages to check they are not being triggered unnecessarily. Adding some messages to a table event on update can make it easier to understand how often calculations are firing
Put in messages and timers in your code to find out where the bottle-necks are.
Use the profiler in Debug mode to better understand what your code is spending time doing.
Add a log server to log all the changes to your system to see how often data changes and whether the changes are meaningful.

Servoy should not be slow. NG-client feels smoother and faster than Smart Client, but Smart Client should perform acceptably.

Hope this gives you some new ideas,


Re: Speed Up Servoy Performance (Client + Server)

PostPosted: Tue Apr 06, 2021 11:49 am
by robert.edelmann
I'd definitly chheck the "Database Performance" in the Administration, if there are queries that take much time / are used often, and then you could check on the database-server if the tables are correctly indexed ("explain select...").

Another thing to keep in mind, the smartclient, in my understanding, get's the data from the server and works on the lokal machine and sends the data back to the server.

So if your functions aggregate/calculate data on smartclients, that could cause performance-issues on the network. In this case, the webclient or the ngClient is faster, or you could move the functions to a headless-client that does the heavy lifting on the server.

Re: Speed Up Servoy Performance (Client + Server)

PostPosted: Thu Apr 08, 2021 10:21 am
by swingman
Just thought of another thing, in the old days I would write code walking through records using the controller. Because this involves the UI it is slow. Convert any such code to walk through foundsets instead. It is possible to create foundsets independently of any forms using

var fs = databaseManager.getFoundSet('my_database_name', 'my_table_name');

Re: Speed Up Servoy Performance (Client + Server)

PostPosted: Tue May 04, 2021 8:01 am
by s.liebig
Hello guys,

thanks first of all for your help.
Yes we are still using the Smart Client. We have now looked at the issue with the indexes. As it looks it speeds up the program dramatically. From 45 minutes of calculation time to 7 minutes is definitely a big improvement. We are now trying to implement the index of the database on each table.
However, until the NG client, we need to increase the speed.

7 minutes is satisfactory but can it possibly be faster? We have already examined the source code and investigated the performance of the database.

We have found a bottleneck at most in a loop, but there is nothing else there except a query that retrieves data from the database and calculates what is needed at this point.

Are there any other settings in Java or on the database? We are aware that Servoy can't multithread unfortunately.

I am looking forward to an answer.
Dmitrij | HV-Office

Re: Speed Up Servoy Performance (Client + Server)

PostPosted: Tue May 04, 2021 10:12 am
Hi Dmitrij,

s.liebig wrote:We have found a bottleneck at most in a loop, but there is nothing else there except a query that retrieves data from the database and calculates what is needed at this point.

You didn't give us much info on your situation other than that things are slow in some here are some questions.

Did you measure what part of this loop is slow? Is it the query?
If so, does it actually use any indexes? (the mere existence of an index doesn't mean it gets used in specific queries). How much data does it return?
Could the calculations be done inside the SQL?
Are you writing the calculated values back to the DB?
Is this a big loop? If so are you running it all within a database transaction? (with PostgreSQL this can speed up things).
And did you also look at the general setup of the database server? Or better yet, let a DBA look at it.
Also do you have many users on the system? At some point (in combination with specific design decisions) data-broadcasting can cause some slowdown.

Hope this gets you further.