Interpretation of client performance statistics

Forum to discuss the new web client version of Servoy.

Interpretation of client performance statistics

Postby robrecht » Mon Nov 20, 2017 11:09 pm

Hi,

I am trying to give our application a performance boost for the ng client so I am checking the "client performance" functionality in servoy admin pages.
Most time consuming seems to be this method :

Schermafbeelding 2017-11-20 om 22.03.14.png


Is it correct to interpret that it takes avg 1,226 seconds to execute 1 api call "servoydefault-textfield.getWidth" ?
If yes, why is it that high ?

Can I conclude that my actual code takes 43,014 - 36,658 = 6,356 seconds and the rest of the time is consumed by the api calls for servoydefaults?

Thanks
Robrecht

EDIT
When debugging our own components we see that the acutal callback to servoy is taking most of the time.
Is there an explanation for that?
You do not have the required permissions to view the files attached to this post.
robrecht
 
Posts: 90
Joined: Wed Aug 01, 2012 4:30 pm

Re: Interpretation of client performance statistics

Postby Andrei Costescu » Tue Nov 21, 2017 10:57 am

Yes, you are correct. But also see the max/min times. So max time when calling that to the browser is 8,047 sec. Min time is 0,5 sec.
On the label.getWidth (which basically does the same thing) you have average 0,81 sec with max 5 sec and min 0,031 sec.

At first glance it seems that it depends on the network connection. You had at least one client with bad connection - which had those high values of 8 and 5 sec and some fast client connections that were faster. The average is much affected by the max values because the number of times it got called is low (20 calls out of which 18 did sync client-side api calls).

That call is sent to client, processed there (should be fast inside the browser) and sent back. For example if the one with 0,5 sec would have 240ms network latency then that would be where most of the time was spent.

Try to avoid client-side calls that wait for a return value as much as possible
. That is why the gray columns were added - to shed a light on these calls.

Btw in list/tableview it might need to scroll on client to the selected record before executing the API call which could mean in worst-case-scenario also the need to load some data on client (if the data is not yet loaded where it needs to scroll to) - so in such scenarios it could take longer to execute the API call even on client (on top of the usual back-and-forth it could trigger and wait for more data loading from the server + ui updates on browser). But for simple fields the API call itself - ignoring the network times - should be fast.

You are correct about the "43,014 - 36,658 = 6,356 seconds" assesment.
Last edited by Andrei Costescu on Tue Nov 21, 2017 11:06 am, edited 1 time in total.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: Interpretation of client performance statistics

Postby Andrei Costescu » Tue Nov 21, 2017 11:05 am

What do you mean with "the acutal callback to servoy"?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: Interpretation of client performance statistics

Postby robrecht » Tue Nov 21, 2017 11:25 am

Hi Andrei,

It sounds reasonable that this is caused by a bad connection, but this was my local servoy developer environment so network shouldn't be an issue.

What I mean with my previous remark regarding debugging our own components:
When executing following server code we can debug the client side code and the response is given almost instantly and no more client code is being executed
But this one line of code lasts a few seconds...
So the client has its response already but it takes a lot of time for servoy to get this actual response.

Code: Select all
// 'datacontrol' is our custom webcomponent, having a client side api "getIndexById"
var index = elements.datacontrol.getIndexById(3')


Any other ideas on this?

Thanks
Robrecht
robrecht
 
Posts: 90
Joined: Wed Aug 01, 2012 4:30 pm

Re: Interpretation of client performance statistics

Postby Andrei Costescu » Tue Nov 21, 2017 12:04 pm

Yes what I also said earlier - the actual execution of the API call can be very fast and the rest of the time is network times.
But in your case - local server that should not be an issue. I assume you don't have any slow network simulators active :).

Can you create a small sample with what you see? I want to try it out. I can't believe that on localhost it can take seconds to execute an API call that in browser is almost instant. If there is a bug we should find it.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: Interpretation of client performance statistics

Postby robrecht » Wed Nov 22, 2017 12:48 pm

In a small sample solution I don't get this beviour :roll:
Will update you later on

Thanks
robrecht
 
Posts: 90
Joined: Wed Aug 01, 2012 4:30 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 1 guest