Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Huge memory consumption during printing

edited January 2004 in General
Hi,

We use Report Builder 7.02,Delphi 5. It appears that a lot of objects are
never freed during or after printing process. We checked it with Memproof
and it seems that a lot of problems with Tmemorystream.
For instance a lot of TMemorystream are not freed by
TppCacheable.WriteRecordToCache method.

Any ideas

Thanks

Comments

  • edited January 2004
    Hi Vincent,

    The information being cached in the TMemoryStream used in the
    WriteRecordToCache is the minimal amount of information needed to be able to
    jump from one page to another in the previewer. If you would like to see
    what information is cached, check out the Cache Records in the ppTypes.pas
    file. You will see that most of the information being cached is either
    boolean or integer data. This means that unless you are running a very
    large report, the CacheStream memory stream may not be the problem.

    If you would like to free these streams after a report has finished
    printing, you can use one of the following methods:

    1. Call Report.CacheManager.ResetCache;

    2. Load a blank template into the report object.

    3. Free the entire report object.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2004
    Hello,

    We struggled with the same thing, and after a lot of investigation came to
    the conclusion that:
    -each time report-builder prints, it creates objects for all the
    tables/views available to the application (not the ones used in the Report,
    but all!)
    - The above seems like a smart caching-scheme, but in fact, they are
    released and re-allocated if you do another print (this slows down the
    second print very much. We have experienced over 30 seconds on a up to date
    development PC).

    This also slows down design-time (switching to and from data-tab etc.), So
    each time we want to work in RB, we need to take away DBA rights from the
    Oracle user so that it sees only the objects in it's own schema. That way
    the tables should be reduced quite a lot, and mem-consumption is a lot
    better.

    I hope this will help.

    Best Regards,
    Paul Wiik,
    Lynx Technologies

This discussion has been closed.