0
votes

In Delphi 10.1 Berlin, I'm building an application displaying data in a tablegrid.

This is quite straightforward, I use :

  • a FDQUery
  • a Datasource
  • a FDConnection to a local SQlite 3 database (100 Mo in size)
  • the only "exotic" feature is a DBgrid from EHlib.

The query is opened on FormShow and displays 10.215 rows in total which, I believe, is not much.

After the form is displayed, when I scroll down with the mouse in the DBGrid, it feels sluggish, or "heavy", I really don't known how to describe that feeling... it's like there was some "weight" attached to the grid.

The memory footprint of the application is 45 Mo of RAM and, by the way, my setup runs 16 Go of RAM, a i7 intel processor and a 512 Go SSD drive...

It is also the same feeling when I resize the application (which by default runs fullscreen).

4 Important points about my application :

  • the DBGrid displays 11 columns, of which 6 are linked to ImageLists and displays small icons, but disabling the Imagelists does nothing
  • my main Form is FormStyle : fsMDIForm and the Dbgrid is displayed on a second Form set as MDI child.
  • The smaller the application is displayed, the less this sluggishness is present.
  • I am not using VCL styles

What I have tried to overcome the situation is switching the dataset fetching mode from fmAll to fmOnDemand, but it changes nothing.

There is really nothing else that I can think of to test...

Code :

There really is no code to show for this form, the only lines I have written so far for this form being a close procedure and a Ressource Freeing procedure :

procedure TfrmMyAssets.Button1Click(Sender: TObject);
begin
  Close;
end;

and

procedure TfrmMyAssets.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

The user clicks a "Close Button" and the FormClose event is called.

Expectations :

Well, in fact, I am just submitting this situation in case someone has already encountered such a situation and could provide advise on how to arrange it. To be honest, it is annoying but the application is still usable.

Thanks in advance for your reading time.

Cheers

Math

1
did you contact EhLib support about this issue?Zam
I doubt whether many readers have access to an EHLib grid. Does a standard TDBGrid exhibit the same behaviour? A TDBGrid should be able to handle 10k rows without behaving sluggishly,MartynA
@MartynA 99.9% that issue related to EhLib component. Why I think so? Once I try it with MS Access database I got different glitches (data refreshing in datagrid only 5 seconds). The same code but with MS SQL Server database works as should be -- no delay and no glitches. I am using EhLib since year 2006 and it's works pretty well even with large number or records.Zam
@Zam: Well, I've voted to close this q, because it's not really on-topic here. If there's an answer, EhLib ought to know it ...MartynA
Sorry for the delay, GMT+11 here. I’contact EHLIb support and see with them. @-MartynA : you are right, standard DBGrid behaves correctly.Mathmathou

1 Answers

1
votes

I should have started by the obvious, as @Zam suggested and contact EHLib.

The problem was in the version used that my Company did not update : we were using v9.0.38 and an update to the latest illegible version solved the problem.

Thank you for you time and this will serve as a lesson for me next time.

Cheers

Math