zhyhero Posted November 9, 2020 Share Posted November 9, 2020 My application were use some free datamodules as public data and method store. And these modules are belong to MainModule as a public member. For example ,the PublicLogin used to do login things,like check username and password,record current login user info. So, LoginForm->MainForm->SomeBusinessFrame is the workingflow. But, loading time of the BusinessFrame's DBGrid had some problem. Use LoginForm or not ,it had diffrent DBGrid loading time. Here is CodeSiteLogging 's Log. The left logs use a LoginForm (unit) , call "PublicLogin.Login()" and "ModalResult:=mrOk" to MainForm. DBGrid's Loading Time are 5xxx ms. The right logs remove LoginForm (unit) and call "PublicLogin.Login()" method in MainForm.FormShow event. DBGrid's Loading Time are 5xx ms. This is so strange . Please give some advice to me. Quote Link to comment Share on other sites More sharing options...
zhyhero Posted November 9, 2020 Author Share Posted November 9, 2020 Update . In my case , set "UniServerModule.AsyncRequest:=false" , DBGrid's loading time decreased to 3xx ms. And it has nothing to do with LoginForm. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted November 9, 2020 Share Posted November 9, 2020 39 minutes ago, zhyhero said: Update . In my case , set "UniServerModule.AsyncRequest:=false" , DBGrid's loading time decreased to 3xx ms. And it has nothing to do with LoginForm. This will disable ScreenMask and may be slow down all working proccess ! Quote Link to comment Share on other sites More sharing options...
alfr Posted November 9, 2020 Share Posted November 9, 2020 Hard to give a definite answer based on the above. But seems that you are loading the frame in the mainform on show. This could impact performance as the form then is already done and visible. I'd recommend to instead do the frame loading in the Mainform create. Depending on how many controls you have in the frame this could impact a lot. (But can of course also be something else as well) Quote Link to comment Share on other sites More sharing options...
zhyhero Posted November 13, 2020 Author Share Posted November 13, 2020 Update. After a lot of testing, I found property "Column.Flex" looks like the key point. In my case ,when set Column.Flex:=1 ,dbgrid loading time extended to 5xxx ms , when leave Column.Flex:=0 ,it is 5xx ms. btw: In my case. there are 9 dbgrids and 10+ datasources and datasets. 9 grids have 50+ columns. 10+ datasets have 70+ fields. Quote Link to comment Share on other sites More sharing options...
zhyhero Posted November 14, 2020 Author Share Posted November 14, 2020 Update. After change "Column.Flex" to default value 0 with my main app, it's DBGrids loading time resume normally. I think "Column.Flex" has some performance problem. 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.