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

DB Images slowing document production (RB10 D6)

edited November 2009 in General
Hi

I have some reports (referred to as documents) which have a header image and
a footer image on each page.

Now a client has these images as 500k and 1.2mb for the header and footer
respectively. These sizes are used as the document is printed and sent out
to clients - the user can then use standard blank paper.

I have made some measurements of performance as follows

No images - 10 documents take 14 seconds
127Kb footer and 55Kb header - 10 documents in 37 seconds
1.2Mb footer and 500Kb header - 10 documents in 396 seconds

So clearly a large header and footer on each page causes issues with
document generation. Now the images they supply are oversized and therefore
the image is shrunk to fit.

Is there anyway of improving the performance of the image production within
the report itself? How is the image treated for each page when it is the
same image, does it reproduce it for each page becuase it is a DBImage?

I would be grateful to any pointers you may have on this.

Regards
Andrew

Comments

  • edited November 2009
    Hi Andrew,

    Which version of ReportBuilder and Delphi are you currently using? Are
    these images being embedded into the report definition or are they being
    retrieved from a database/file?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2009
    Nico

    RB10 and Delphi 6.2

    The images are database images but they are the same image for each page.
    The reason they are in the database is that different brands have different
    headers and footers and the db method allows for the user to determine the
    brand look rather than have a seperate document for each brand.

    As I said earlier is there any trick to doing this? Any technique I could
    employ to improve the performance?

    Regards
    Andrew

  • edited November 2009
    Hi Andrew,

    As a test, try embedding these images into a test report and loading it
    locally (no database interaction) to see how long it takes to preview/print.
    If this increases the performance, we can narrow down the issue to the
    database or blob stream access.

    Which database and connectivity are you using? If you try placing a
    TDBImage on a Delphi form and load one of the larger images, are the load
    times faster?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2009
    Hi

    I am using ODAC and ORACLE.

    I will try the embedded suggestion and the TDBImage onto a delphi form.

  • edited November 2009
    Hi

    I embedded the images into the report directly and removed the DBImage

    With this approach I got 201 seconds for 10 documents which is a decent
    improvement over 396 seconds. I removed the footer completely (1.2mb) and
    got 43 seconds and I then placed the footer back in a removed the header and
    got 121 seconds. I also tried direct draw and it took nearly as long as the
    DBImage version.

    So somewhere in the process of getting the image from the database and extra
    19.5 seconds are consumed per document produced.

    The datapipeline that the images are in is a single record which is only
    fetched once from the database.

    Regards Andrew


  • edited December 2009
    Hi Andrew,

    Thanks for performing the tests. My first suggestion would be to try to
    "shrink" each large image before adding to to the report. ReportBuilder is
    not designed to be an advanced image processor. It primarily uses the
    routines given in the Delphi Graphics library to display and process images
    inside the report. When processing a large image such as the one you are
    adding to each page of your report, the time can increase.

    Another option might be to use a different compression format for these
    images or not compression at all (bmp).

    --
    Regards,
    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.