dataol 2 Posted July 5, 2021 (edited) After upgrading from Delphi 10.3.3 to 10.4.2, my software got really slow when I do a TFDQuery (Master / Detail) loop to edit / post records. In Delphi 10.3.3 the performance is normal. The same problem occurs with Firebird and MSSQLServer databases Please see the attached example. https://quality.embarcadero.com/browse/RSP-34302 Test.rar Edited July 5, 2021 by dataol Share this post Link to post
Stano 143 Posted July 5, 2021 (edited) I'm missing TFDPhysFBDriverLink and TFDGUIxWaitCursor. I don't know if it will help. I can't try it. I have FB v3.07 Project Project1.exe raised exception class EIBNativeException with message '[FireDAC][Phys][FB]unsupported on-disk structure for file D:\DOKUMENTY\Z INTERNETU\TEST\TEST.FDB; found 11.2, support 12.2 IProvider::attachDatabase failed when loading mapping cache'. Edited July 5, 2021 by Stano Share this post Link to post
dataol 2 Posted July 5, 2021 1 hour ago, Stano said: I'm missing TFDPhysFBDriverLink and TFDGUIxWaitCursor. I don't know if it will help. I can't try it. I have FB v3.07 Project Project1.exe raised exception class EIBNativeException with message '[FireDAC][Phys][FB]unsupported on-disk structure for file D:\DOKUMENTY\Z INTERNETU\TEST\TEST.FDB; found 11.2, support 12.2 IProvider::attachDatabase failed when loading mapping cache'. Please try it on Firebird 2.5 Share this post Link to post
Stano 143 Posted July 5, 2021 I used Firebird-2.5.9.27139-0_Win32_embed files. Insert TFDPhysFBDriverLink on the form and enter VendorLib on the given files. He keeps reporting the same mistake to me. I do not know why. Share this post Link to post
Stano 143 Posted July 5, 2021 Um, it's programmatic. the data was displayed in the DBGrid in about 20 seconds. But something was still going on there. I canceled it after a minute This cycle runs relatively quickly for 6 seconds for I := 1 to 20 do begin qryItemReceita.Append; qryItemReceitaID_ITEM_RECEITA.AsInteger := I; qryItemReceitaID_PRODUTO.AsInteger := I; qryItemReceitaQUANTIDADE.AsFloat := 1; qryItemReceitaDESCRICAO_PRODUTO.AsString := 'PRODUCT ' + I.ToString; qryItemReceitaPRECO.AsCurrency := 2.00; qryItemReceita.Post; end; Here it hangs those 20 sec qryItemReceita.First; while not qryItemReceita.Eof do begin qryItemReceita.Edit; qryItemReceitaVALOR_DESCONTO.AsCurrency := qryItemReceitaVALOR_DESCONTO.AsCurrency + 0.1; qryItemReceita.Post; // This action takes about 3 seconds during the first cycle. At 20 cycles of 10 sec! qryItemReceita.Next; end; Try converting both cycles to batch processing (DMArray) Share this post Link to post
Stano 143 Posted July 5, 2021 I found a problem. It's in DBGrid. I threw away his DataSource and at the end Button1Click DBGrid1.DataSource: = dsQryItemReceita; It goes immediately. Share this post Link to post
dataol 2 Posted July 5, 2021 37 minutes ago, Stano said: I found a problem. It's in DBGrid. I threw away his DataSource and at the end Button1Click DBGrid1.DataSource: = dsQryItemReceita; It goes immediately. Thanks for answering. But I've forced this to simulate the problem. On Delphi 10.3.3 it is too faster than 10.4.2 Share this post Link to post
Stano 143 Posted July 5, 2021 Personally, I do not use DBGrid. There are always some problems with them. I use VirtalStringTree. Share this post Link to post
Uwe Raabe 2057 Posted July 5, 2021 Enclosing the loops with a qryItemReceita.DisableControls/EnableControls should help a bit. 1 Share this post Link to post
Stano 143 Posted July 6, 2021 I knew that something like that. I just didn't find it. Share this post Link to post
Tommi Prami 130 Posted July 7, 2021 Please Update Ticket: https://quality.embarcadero.com/browse/RSP-34302 And/Or make new one, if you can pinpoint the exact cause of the slowdown. (If it is actually true performance regression between those Delphi versions) -tee- Share this post Link to post
dataol 2 Posted July 7, 2021 8 hours ago, Tommi Prami said: Please Update Ticket: https://quality.embarcadero.com/browse/RSP-34302 And/Or make new one, if you can pinpoint the exact cause of the slowdown. (If it is actually true performance regression between those Delphi versions) -tee- Ok Tommi. I´ll do it. There is a perfermance regression for sure. Please check the attachement on the ticket that contains a test with the same code compiled in 2 different Delphi versions. Thanks Share this post Link to post
dataol 2 Posted September 13, 2021 This issue was fixed on Delphi 11 Alexandria. Thanks 1 Share this post Link to post