4

In Firemonkey, i found Livebindings engine extremely slow when binding grids with databases. It takes more than 30 seconds to fill up a grid with 5000 records and 10 columns.

I tried both TBindDBGridLink and TBindGridLink and results are the same. It looks like all the data that will fill the grid are loaded in memory even if the grid doesn't show them.

Any tip to improve performance?

In VCL, DB aware components can get data nearly instantly. Do you think that VCL is still the better option for new business application projects that will focus on Windows in the beginning?

Johan
  • 74,508
  • 24
  • 191
  • 319
Xenon
  • 179
  • 2
  • 14
  • If you want to move to Mac with Delphi then your only choice is Firemonkey. If you want to Windows only the VCL is the better choice for business apps. Firemonkey will catch up it just needs time to mature. – Robert Love Dec 20 '11 at 13:38
  • Are you using TGrid or TStringGrid? – Marcus Adams Dec 20 '11 at 21:10
  • @RobertLove At the moment I'm interested in Windows but it would be nice to start a new project that will be easly extended to other platforms. – Xenon Dec 20 '11 at 21:57
  • @MarcusAdams TStringGrid – Xenon Dec 20 '11 at 21:58
  • 1
    @MarcusAdams I just changed the BufferCount property of the TBindDBGridLink (it's the same for TBindGridLink) to 5000. – Xenon Dec 21 '11 at 20:22
  • I can't find any way around this. It's slow with all of the RTTI calls and creating a hash for all of the outputs and does this for each row and column. I think you could create pages for the user with filters. At least then, the time is split up for each page load. – Marcus Adams Dec 22 '11 at 17:36
  • I found that if you set a limit on the BufferCount property (like 5 on a 5000 records dataset) there is still a big delay on synchronizing the current row of the grid with the RecNo of the dataset. As you said, looks like the solution at the moment is to work with lesser data using tricks like pages. Thank you for your time. I hope this will be improved someday. – Xenon Dec 22 '11 at 18:42
  • @Xenon I have the same problem, I use hundreds os TLisView and it simply load everything in memory first. It is not like VCL where is was loaded when needed. Now I let this way for tables that I know the size. But for those tables that with time will reach more than 1,000 records I am always adding a filter option to retrieve only what is needed. Sometimes it seems a step back in design in my app, but no other option yet. – Eduardo Elias Aug 17 '14 at 19:07

0 Answers0