Jump to content

Debugging performance


rhazell

Recommended Posts

Can anyone suggest a good approach for debugging & tracing form creation, please?

On a relatively simple form, I am experiencing large periods of time from the time I create the form until it is displayed & ready to use by the user - pauses in the magnitude of 10 seconds.

My form has a table and a UniDBGrid so there's many things that can happen here, however, my table operations (opening, filtering) only appear to account for a 1-2 seconds of the delay.

Right now, I've added a logging in many critical UniDBGrid, Table & Form events, however, even when I have a suspicious gap in time between 2 logged events, I really don't know what else has happened in between. Combine this with ajax communications between browser and server, and it's very difficult to pinpoint the cause.

At this point, I'm just trying to understand where the root cause is... my use of tables/ queries... my misunderstanding of the rendering to browsers... event handlers taking too much time etc...

 

Any ideas, tips, or tricks of things I can do to zero in on a cause?

 

Thanks in advance.

Link to comment
Share on other sites

On 10/11/2023 at 3:11 PM, rhazell said:

Can anyone suggest a good approach for debugging & tracing form creation, please?

On a relatively simple form, I am experiencing large periods of time from the time I create the form until it is displayed & ready to use by the user - pauses in the magnitude of 10 seconds.

My form has a table and a UniDBGrid so there's many things that can happen here, however, my table operations (opening, filtering) only appear to account for a 1-2 seconds of the delay.

Right now, I've added a logging in many critical UniDBGrid, Table & Form events, however, even when I have a suspicious gap in time between 2 logged events, I really don't know what else has happened in between. Combine this with ajax communications between browser and server, and it's very difficult to pinpoint the cause.

At this point, I'm just trying to understand where the root cause is... my use of tables/ queries... my misunderstanding of the rendering to browsers... event handlers taking too much time etc...

 

Any ideas, tips, or tricks of things I can do to zero in on a cause?

 

Thanks in advance.

To measure performance on the server side please use TStopWatch - system.diagnostics. You can view the speed and data download flows in the browser console (Network tab).

 

Maybe it will help...in the mainmodule there is a handleRequest event which receives (see unigui Demos (Request log)) the component identifier and the name of the method from ajaxRequest (there you can also get a pointer to the component on the server and compare the Click(js)-onClick events (Delphi )).

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...