Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 29 Mar 2024, 09:09

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 27 Feb 2018, 20:30 
Offline

Joined: 12 Jul 2013, 22:21
Posts: 19
Hi

I have a problem with DBGridEh, the program frequentelly stops responding or freezes when I use StartLoadingStatus and FinishLoadingStatus.

Delphi Tokyo 10.2.2
Ehlib 9.0135
Windows 10 and Windows 7

ps: I have a lot of performance problems with DBGrideh :(
I'm a bit desappointed with Ehlib...
I has used Infopower for years before chance to EhLib.


Top
 Profile  
 
PostPosted: 28 Feb 2018, 19:54 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Quote:
I have a problem with DBGridEh, the program frequentelly stops responding or freezes when I use StartLoadingStatus and FinishLoadingStatus.

We need to reproduce the error on our computer.
Сan you describe in more detail when an error occurs or send a Demo project?


Quote:
ps: I have a lot of performance problems with DBGrideh

Can you describe each problem separately so that we can repeat it and work out for each task.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 02 Mar 2018, 15:11 
Offline

Joined: 12 Jul 2013, 22:21
Posts: 19
it's very complicated build a sample, becouse Database used etc, so I'm trying to investigate

Some additional information about some situations:

1) Application Freezing (or Crash) occurs when I use a PLAYSOUND (SND_ASYNC) function from Windows and then I call DBGridEh.StartLoading.

Ex:
...
PlaySound(PChar('click'), hInstance, snd_Sync or snd_Resource);
DBGridEh1.StartLoadingStatus('Aguarde... ');
...
unfortunately this does not occur at all times nor in every FORM.

2) PERFORMANCE

begin
Try
MemTableEh1.DisableControls;
EhDBGrid1.StartLoadingStatus('Aguarde... Buscando contas a Receber...');

// Query Execute
nxQExtrato.Open; // 1 second - 94000 records

MemTableEh1.Close;
MemTableEh1.EmptyTable;
MemTableEh1.LoadFromDataSet(nxQExtrato,-1,lmCopy,False); // 12 seconds
MemTableEh1.Open;
Finally
MemTableEh1.EnableControls; // 108 seconds to execute
EhDBGrid1.FinishLoadingStatus();
end;


Top
 Profile  
 
PostPosted: 07 Mar 2018, 23:23 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Quote:
1) Application Freezing (or Crash) occurs when I use a PLAYSOUND (SND_ASYNC) function from Windows and then I call DBGridEh.StartLoading.
We can reproduce the error in this code

Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
//  PlaySound(PChar('C:\Windows\media\Ring01.wav'), hInstance, snd_Sync or snd_Resource);
  PlaySound(PChar('C:\Windows\media\Ring01.wav'), hInstance, SND_ASYNC);
  DBGridEh1.StartLoadingStatus('Ggggg');
  Sleep(1000);
  DBGridEh1.FinishLoadingStatus();
end;

can you send call stack?

Quote:
2) PERFORMANCE


Try to create Demo project using next steps.
- Change query to returns a not very large number of records. (1000)
- Use new code to save result to the table procedure TMemTableEh.SaveToFile(const FileName: string = '');
- Create Demo project with one Form and copy a Grid from the Form from your main project.
- put MemTableEh and DataSet and bind them.
- Use procedure TMemTableEh.LoadFromFile(const FileName: string = ''); to load data from File.

Code:
MemTableEh1.DisableControls;
EhDBGrid1.StartLoadingStatus('Aguarde... Buscando contas a Receber...');

// Query Execute

MemTableEh1.Close;
MemTableEh1.EmptyTable;
MemTableEh1.LoadFromFile(FileName); // 0 seconds
MemTableEh1.Open;

MemTableEh1.EnableControls; // ?? seconds to execute

Check the result of EnableControls
It it is too slow then send us a this Demo project.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 02 Sep 2020, 14:03 
Offline

Joined: 14 Aug 2020, 18:12
Posts: 2
I'm having the same problem! When I enable data-aware controls, application freezes!


Top
 Profile  
 
PostPosted: 03 Sep 2020, 04:26 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

I try to reproduce the problem in the Demo project.
But it work.
Can you change the attached Demo to make it freezes?

The test code is next:
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
  DBGridEh1.StartLoadingStatus('Loading');
  MemTableEh1.DisableControls;
  MemTableEh1.Close;
  Sleep(1000);
  MemTableEh1.Open;
  MemTableEh1.EnableControls;
  DBGridEh1.FinishLoadingStatus();
end;


Attachments:
2020-09-03-StartLoading-FinishLoading.zip [2.62 KiB]
Downloaded 109 times

_________________
Best regards
EhLib Support Team
Top
 Profile  
 
PostPosted: 16 Dec 2020, 21:06 
Offline

Joined: 16 Dec 2020, 20:55
Posts: 3
Hello everyone!
Actually, I had this problem too, it depends on the situation but for standalone lists, I fixed the problem in this way finally:

1- Remove any DataDriver (using Driver probably decrease the performance, as my situation was)
2- Do not use MemTable.Active or MemTable.Open instead of that use an AdoQuery or something else then use
Memtable.LoadFromDataset method just after the main query is opened to fetch all records, this method is very faster overall.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group