onAction() should accept a parameter as a field value

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Re: onAction() should accept a parameter as a field value

Postby rafig » Wed Oct 26, 2016 3:46 pm

Hi
Bernd.N wrote:Thanks for the tip!
Is a valuelist really loaded fresh from DB each time when a form shows, or just only once at form.onShow/firstShow ?
When the first is true, I can imagine that it slows down a solution, while the second is totally fine, as then a valuelist is loaded only when it is needed.

I can't say for sure, but if anything might have changed in it, I guess Servoy may reload it.
Might be an idea to check the 'Performance' page of Admin clearing, it, then displaying your forms with Vls, then changing form, clearing perf. then checking again and seeing if it might be reloading??
(Otherwise, someone from Servoy might want to say).
I do know that for my client, it improved performance, YMMV.
You could test as well by creating 'static' copies of your current value lists as above, and then re-assigning them on your form (but keeping the original ones to assign back to if no speed gain) ;-)
Servoy Certified Developer
Image
rafig
 
Posts: 708
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Valuelist loading

Postby Bernd.N » Wed Oct 26, 2016 4:35 pm

Thanks for the tip!
I tested it, and a second call of a form that has a specific table-related valuelist does not fire an additional SELECT on the DB.
However I noted that we use too much valuelists for large tables, as each of them certainly result in such a SELECT. We will refactor them to picklists that fire only in the moment when the user actually uses them.

I also saw this message in the console, seems to be new in the latest Servoy edition, and this adds to my feeling that valuelists are not the proper tool for large tables:
Valuelist vl_ps_employee_full_name fully loaded with 500 rows, more rows are discarded!!

I also did this performance test with http://localhost:8080/servoy-admin/performance on startup and got again a lot of valueable information where we can improve things.
That tool is really a great help.
Last edited by Bernd.N on Wed Oct 26, 2016 4:40 pm, edited 1 time in total.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 544
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Valuelist loading

Postby rafig » Wed Oct 26, 2016 4:39 pm

Bernd.N wrote:Thanks for the tip!
I tested it, and a second call of a form that has a specific table-related valuelist does not fire an additional SELECT on the DB.
However I noted that we use too much valuelists for large tables, as each of them certainly result in such a SELECT. We will refactor them to picklists that fire only in the moment when the user actually uses them.

I also did this performance test with http://localhost:8080/servoy-admin/performance on startup and got again a lot of valueable information where we can improve things.
That tool is really a great help.


Happy to help and glad you have found ways to improve things. ;-)
Servoy Certified Developer
Image
rafig
 
Posts: 708
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Previous

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 15 guests

cron