Releasing memory after print.
Hi,
My previous posts on the memory consumption issue is gone. Don't know why,
but I trust Ed still remember them:
I have now traced EndUser.exe (from Demos\4. EndUser Databases\ Oracle 8\3.
DOA) using memProof.
For you to believe me, I went trough the trouble of making screenshots of
this process, that I put on:
http://www.iappeurope.com/RBMemoryConsumption/memconsumption.htm
Could you please have a look at this?
It can't be Task manager when it shows in memProof, right?
Besides, I'm *not* saying it is a memory Leak. The memory gets freed if you
open a report in design time. It actually gets freed also if you run a new
report. My issue is that it gets freed only right before (I think) loading a
new template. This in combination with ISAPI and 10-20 threads is a killer.
I'm not after blaming anyone, I just want an answer to:
What is allocated during a Print / Print Preview, that is not freed until :
a new report is loaded (either in design or print mode)
Reporbuilder is freed.
??
If it can't be fixed, than maybe by understanding what goes on, I can reduce
consumption.
I found news-threads from other users wondering about the same thing. They
also got the reply that this is Task-manager. Thats just not correct.
Best Regards,
Paul Wiik
My previous posts on the memory consumption issue is gone. Don't know why,
but I trust Ed still remember them:
I have now traced EndUser.exe (from Demos\4. EndUser Databases\ Oracle 8\3.
DOA) using memProof.
For you to believe me, I went trough the trouble of making screenshots of
this process, that I put on:
http://www.iappeurope.com/RBMemoryConsumption/memconsumption.htm
Could you please have a look at this?
It can't be Task manager when it shows in memProof, right?
Besides, I'm *not* saying it is a memory Leak. The memory gets freed if you
open a report in design time. It actually gets freed also if you run a new
report. My issue is that it gets freed only right before (I think) loading a
new template. This in combination with ISAPI and 10-20 threads is a killer.
I'm not after blaming anyone, I just want an answer to:
What is allocated during a Print / Print Preview, that is not freed until :
a new report is loaded (either in design or print mode)
Reporbuilder is freed.
??
If it can't be fixed, than maybe by understanding what goes on, I can reduce
consumption.
I found news-threads from other users wondering about the same thing. They
also got the reply that this is Task-manager. Thats just not correct.
Best Regards,
Paul Wiik
This discussion has been closed.
Comments
Thanks for the description and screenshots. ReportBuilder is caching the
pages in case more instructions are given before you load another template.
As a workaround, you might try loading a blank template after you print to
free the cached memory before you load your next template from the database.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you. This is the kind of info that I was after. Now I can at least get
rid of the problem with memory consumption of the ISAPI reaching several
100Mb's. BTW: I tried something like Report1.template.new; without any
success.
However I'm surprised that a simple two page report cached is taking up 19Mb
of memory (no pictures)?
Your example reports doesn't consume nearly this much even though they are
10 times more pages.
I just want to find out what I'm doing wrong, since other reports doesn't
have this issue.
The only difference I can think of is that we are using DOA and quite a lot
of RAP.
As mentioned before, this release process takes approx 60 seconds (of CPU
time, Task manager) on my rather high spec dev. PC before it finally starts
loading next report in development mode or a new print.
The fact that the CPU usage of EndUser.exe is over 90% when this release
process is going on makes me a bit sceptical that this is the work of
Windows Garbage collector.
Best Regards,
Paul
What are you trying to accomplish in RAP? You might try using Windows API
calls to find out the .dll files that are being loaded when you run your
application and see if the memory usage adds up. 19 meg for a two page
report does seem very odd.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
being
Thanks for the tip, However, I don't really understand what you mean by
this. We are running our reports from your EndUser application. Would your
suggestion of loading dlls still be applicable?
Is there any chance that the huge memory consumption is related to :
- Our Oracle users beeing DBA (In designmode they get tables/views from all
Oracle users. This means probably more than 1000 tables).
- Some sort of caching of data from the tables used in the Queries. Our
tables are quite big with a lot of Varchar2(4000) fields.
BTW: The example report (19Mb) I've used doesn't use any RAP (We haven't
modified RTTI on your EndUser app), and it's a typical single report print.
It prints the details of one record, and the details of subtables in
subreports. these subtables can have many records, but the example produced
only two A4 Pages. As said before, there are 10 subreports on this specific
report.
In RAP we mainly do these things:
1. Show search criterias in header of report. That means something as easy
as reading what the user input, and then display it in a label.
2. The other thing is that we have published TOracleQuery in RAP. We use
that for running subqueries for reading complex table-joins and criterias.
This is all done to overcome the limitiations in Query Designer. We can't
use Edit SQL since that disables search criterias.
3. Populate Tee-charts from running TOracleQueries since I can't think of
any other way to create our complex charts. In order to use Query-designer I
think we would have to use a lot of complex views, and PL/SQL.
4. Simple calculations (percentages based on some of the DB values etc.)
A lot of our reports are set up only with "select count(*) from mytable"
just as bogus to produce one page, and to allow the user to fill in a
criteria, that we can pick up and use in TOracleQueries.
Best Regards,
Paul