rhazell Posted October 11, 2023 Share Posted October 11, 2023 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. Quote Link to comment Share on other sites More sharing options...
Skyp Posted October 12, 2023 Share Posted October 12, 2023 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 )). 1 Quote Link to comment Share on other sites More sharing options...
rhazell Posted October 12, 2023 Author Share Posted October 12, 2023 That will give me a place to start. Much appreaciated! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.