Speed Up Servoy Performance (Client + Server)

Questions, answers, tips and ideas on Servoy Client

Speed Up Servoy Performance (Client + Server)

Postby s.liebig » Tue Mar 30, 2021 12:19 pm

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
s.liebig
 
Posts: 5
Joined: Fri Jul 26, 2019 9:13 am

Re: Speed Up Servoy Performance (Client + Server)

Postby swingman » Sun Apr 04, 2021 11:19 pm

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,

Christian
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Speed Up Servoy Performance (Client + Server)

Postby robert.edelmann » Tue Apr 06, 2021 11:49 am

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.
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 91
Joined: Wed Aug 14, 2013 6:12 pm

Re: Speed Up Servoy Performance (Client + Server)

Postby swingman » Thu Apr 08, 2021 10:21 am

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');
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Speed Up Servoy Performance (Client + Server)

Postby s.liebig » Tue May 04, 2021 8:01 am

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
s.liebig
 
Posts: 5
Joined: Fri Jul 26, 2019 9:13 am

Re: Speed Up Servoy Performance (Client + Server)

Postby ROCLASI » 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 loop....so 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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 7 guests

cron