TfrxPictureView memory usage

Hi,

If I place a TfrxPictureView object with a static picture on a data band and the band repeats many times, generating the report uses a huge amount of memory.

It appears that FR is duplicating the entire image object, instead of just reusing the same image and duplicating the reference to it. Is there some way I can force it to reuse the same image data instead of making copies of it for every band?

Thanks,
Pierre

Comments

  • edited 1:34AM
    Just tried it:
    - create an empty report;
    - put a TfrxPictureView on the databand;
    - load a picture into it;
    - set databand.RowCount to 1000 to repeat it 1000 times;
    - run the report.
    You will see the report generates immediately and takes a little amount of memory.
  • edited 1:34AM
    Hi Alex,

    Thanks for looking into this. You have to preview the report and step through the pages. I did the same thing as you - image on a band repeated 1000 times. I then stepped through the preview one page at a time and got this error on page 11:

    Debugger Exception Notification
    Project Project1.exe raised exception class EOSError with message 'System Error. Code: 8.
    Not enough storage is available to process this command'.
    Break Continue Help

    It was a large image (4MB), but it happens with smaller images as well - it just takes more pages. I tried the UseFileCache option but it didn't help.

    I assume it is caching preview pages or something like that. Is there a way I can force it to cache less pages to prevent this kind of problem?

    Thanks,
    Pierre
  • edited November 2006
    Normally FR caches 50 preview pages. I can add a parameter to PreviewOptions that handles this.

    + added TfrxReport.PreviewOptions.PagesInCache property
  • edited 1:34AM
    Hi Alex,

    Yes, I agree - that will be a very useful option to have.

    Thanks,
    Pierre

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.