getPrinterCapabilities slow

edited June 2001 in General
I create a report at run time.
I noticed that setting the units of the report is quit slow : it lasts about
2 seconds.

freport := tppReport.create (self);
freport.dataPipeLine := fpipeLine;
freport.units := utMillimeters; {<<< slow}

It seems that the function TppPrinterInfo.GetPrinterCapabilities takes a lot
of time when called for the first time.
Subsequent calls to that function are fast !

Is there an explanation for this behaviour ?

Herman Bernaerts


  • edited June 2001
    It is slower the first time, because RB must talk to the printer driver for
    the first time. As much information that RB needs about the printer should
    be cached, and hence it should lower the communications sent to the driver
    for subsequent actions. Naturally, the speed at which this initial
    communication with the printer driver is completed is also dependent on the
    machine's speed.


    Jim Bennett
    Digital Metaphors

  • edited June 2001
    Can I put some code in the startup phase, to move that 'delay' to the
    program initialization ?

  • edited June 2001
    There is an issue when first report in an application loads there was a
    performance hit because some printer initialization logic was firing. On
    systems with slow printer drivers this caused a noticeable delay in loading.
    I'm sending a patch to you via email.


    Jim Bennett
    Digital Metaphors

  • edited June 2001
    I still see the same delay, with the patch.


This discussion has been closed.