Autosize performance
Hi,
I've got some problems, and it seems related to the autosize property.
Here's a part of my code.
//--------------------------------------------------------------------------
ppLblStatRx.Caption := pplblDirectiveCd.Caption + pplblNew.Caption;
if iFillSeq > 1 then
ppLblStatRx.Caption := ppLblStatRx.Caption + 'R';
ppLblStatRx2.Caption := ppLblStatRx.Caption;
ppLblStatRx3.Caption := ppLblStatRx.Caption;
ppLblStatRx4.Caption := ppLblStatRx.Caption;
//--------------------------------------------------------------------------
All components are standard TppLabel with absolutely no events linked to
them, iFillSeq is and integer value. My problem here is: those little
lines of code take more than 1.5 seconds to run on a P3 - 1000. Once I
removed the "Autosize" property, it doesn't even take 1 milisecond.
I'm looking into the problem, but I am quite lost for the moment. This
part of code is not in an event, but is in a "preparation" function. That
is, I've got a function the initialise captions before actually calling the
print method. Is it part of my problem? Does the engine open the printer
driver only after the print method is called... And thus, everytime I assign
a caption the engine open the drivers, calculate the space needed to print
and then close the driver? Right now, it's my best guess...
But this is only part of my problem... Those same line of code ends up
running in less than 400 miliseconds on a P2 - 350 mHz. (Admiting linear
performance / mHz, it's about 10 times faster) Considering the various
station I need to manage have different versions of files installed, I was
wondering if you had a list of "known issues" with some version of, lets
say, "GDI32.DLL", or any other DLL files. As for the printer driver, we
are using "IBM InfoPrint 1130 PS3" version 7.4
I hope you can help me with this...
Thanks
Ken Bourassa
I've got some problems, and it seems related to the autosize property.
Here's a part of my code.
//--------------------------------------------------------------------------
ppLblStatRx.Caption := pplblDirectiveCd.Caption + pplblNew.Caption;
if iFillSeq > 1 then
ppLblStatRx.Caption := ppLblStatRx.Caption + 'R';
ppLblStatRx2.Caption := ppLblStatRx.Caption;
ppLblStatRx3.Caption := ppLblStatRx.Caption;
ppLblStatRx4.Caption := ppLblStatRx.Caption;
//--------------------------------------------------------------------------
All components are standard TppLabel with absolutely no events linked to
them, iFillSeq is and integer value. My problem here is: those little
lines of code take more than 1.5 seconds to run on a P3 - 1000. Once I
removed the "Autosize" property, it doesn't even take 1 milisecond.
I'm looking into the problem, but I am quite lost for the moment. This
part of code is not in an event, but is in a "preparation" function. That
is, I've got a function the initialise captions before actually calling the
print method. Is it part of my problem? Does the engine open the printer
driver only after the print method is called... And thus, everytime I assign
a caption the engine open the drivers, calculate the space needed to print
and then close the driver? Right now, it's my best guess...
But this is only part of my problem... Those same line of code ends up
running in less than 400 miliseconds on a P2 - 350 mHz. (Admiting linear
performance / mHz, it's about 10 times faster) Considering the various
station I need to manage have different versions of files installed, I was
wondering if you had a list of "known issues" with some version of, lets
say, "GDI32.DLL", or any other DLL files. As for the printer driver, we
are using "IBM InfoPrint 1130 PS3" version 7.4
I hope you can help me with this...
Thanks
Ken Bourassa
This discussion has been closed.
Comments
professional
"Ken Bourassa" a ?crit dans le message de
If you try this code connected to a different printer (or at least connected
to a different printer driver) do you still see the same performance
descrepancy? In my testing connnected to a HP LaserJet 5, the difference in
runtime between code similar to yours below with the AutoSize property
toggled was virtually the same.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com