|
TOracleDataSet Refresh Memory Increase
|
Joined: Sep 2007
Posts: 8 Frankfurt am Main, Germany
Member
|
OP
Member
Joined: Sep 2007
Posts: 8 Frankfurt am Main, Germany |
delphi 2005, doa 4.0.7.1, oracle 10.0.2.1 db/client
i use a TOracleDataSet with TDataSource, about 30 Fields and 50 rows per refresh. any time i do a Toracledataset.refresh and i do almost every second my process memory increases 16KB. this results in an out of memory case after a couple hours of running my application.
i tried to change readbuffer from 25 downto 1, but theres is still a memory increase of about 4KB.
please help, i
Claus Reinhardt
Inforent GmbH Stephanstrasse 3 60313 Frankfurt am Main Germany
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Oct 1999
Posts: 138 Eschborn, Germany
Member
|
Member
Joined: Oct 1999
Posts: 138 Eschborn, Germany |
Could you create a sample app for this ??
Greetings Jens
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Aug 1999
Posts: 22,206
Member
|
Member
Joined: Aug 1999
Posts: 22,206 |
As a test, what happens if you repeatedly run (Execute + Next until Eof) the same query in a TOracleQuery instance?
Marco Kalter Allround Automations
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Sep 2007
Posts: 8 Frankfurt am Main, Germany
Member
|
OP
Member
Joined: Sep 2007
Posts: 8 Frankfurt am Main, Germany |
here is a sample tested in delphi 2005 or 2006:
vcl form with two tbuttons, toracledataset (ods), tdatasource (ds), toraclesession (os):
procedure TForm1.Button1Click(Sender: TObject); begin if ods.Active then ods.Close else ods.open; { the same with active true/false } end;
procedure TForm1.Button2Click(Sender: TObject); begin ods.refresh; end; { refresh has the biggest memory consumption } or try procedure TForm1.Button2Click(Sender: TObject); begin ods.first; while not ods.eof do begin inc(c); ods.RefreshRecord; ods.next; end; end;
when you hit button2 about 10/20 times you can see memory increasing in the task manager. refresh is very obvious, refreshrecord less
when you connect a dbgrid with the datasource the memory increment can be about 16k per click.
i played with compiler directives, i tried delphi 2005 and 2006 on two machines and all the same. since i need to refresh my db data very often its really a problem because when the application runs about 8 hours it takes about 1gb of memory !
thanks in advance for your help :-)
claus reinhardt
Claus Reinhardt
Inforent GmbH Stephanstrasse 3 60313 Frankfurt am Main Germany
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Oct 2001
Posts: 36 Glasgow
Member
|
Member
Joined: Oct 2001
Posts: 36 Glasgow |
Was this ever resolved? If so in which version?
I'm having the same issue in 4.0.7 If you sit and watch Task Manager while it refreshes (the TOracleDataset) the memory use seems to remain fairly constant, but if you try to do other things (open Word, etc.) while the refresh process is running memory use creeps up.
To replicate I've simply put a timer on a form that runs every 15 second to refresh a dataset of 1000 rows (table does have 75 columns with a mixture of types). Has taken me a while to trace the problem as it was affecting customers in a large application with a few 3rd party controls, but as the test app has nothing other than an Oracle dataset, button and a timer I'm now convinced the problem is on refresh.
Thanks
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Aug 1999
Posts: 22,206
Member
|
Member
Joined: Aug 1999
Posts: 22,206 |
No, this was not reproducible. It would be strange if external factors like MS Word would affect this.
Marco Kalter Allround Automations
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Oct 2001
Posts: 36 Glasgow
Member
|
Member
Joined: Oct 2001
Posts: 36 Glasgow |
I've upgraded to 4.1 and this is still happening, strange though it may be, it is definitely dependent on other apps. This is why it has taken me so long to trace the cause. I do not know if this is down to them using memory or processor, but would imagine memory.
I'm seeing it increasing by small numbers of k on my development machine by opening Word, closing it, opening Excel, closing it, etc. Out on the customer's machine it is being run on a terminal server and they are seeing jumps of 5Mb up until the machine runs out of memory and falls-over.
example from my machine: TIME MEM USED 11:18am 14972 11:19am 14976 11:20am 14992 11:21am 15020 11:22am 15040 11:23am 15052 Stopped Doing Anything Else On The Machine 11:23am 15052 11:24am 15052 11:25am 15052 11:26am 15052 11:27am 15052 11:28am 15052 11:29am 15052 11:30am 15052 11:31am 15052 11:32am 15052 Screensaver Kicked In 11:32am 15056 11:33am 15056 11:34am 15056
If you have a database with a large table including blob, number & varchar columns it should be a 5 minute job to replicate.
Should you still not be able to replicate it let me know and I'll try to find the time to write some SQL to create a large table and populate it, then modify my timer app to use it instead.
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Oct 2001
Posts: 36 Glasgow
Member
|
Member
Joined: Oct 2001
Posts: 36 Glasgow |
If it is of any help: the same happens if rather than dataset.refresh you call dataset.close then dataset.open
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Oct 2001
Posts: 36 Glasgow
Member
|
Member
Joined: Oct 2001
Posts: 36 Glasgow |
Any update on this Marco? our customers are chasing us for a fix to this issue.
|
|
|
Re: TOracleDataSet Refresh Memory Increase
|
Joined: Aug 1999
Posts: 22,206
Member
|
Member
Joined: Aug 1999
Posts: 22,206 |
Not really. If you can send me a demo application and the necessary steps to reproduce this, we can give it another look.
Marco Kalter Allround Automations
|
|
|
|
|
|