32 bit fast, 64 bit slow

Hello, this is my first post. Thanks for looking at it. I am using FR 5.2 in DXE7, and the list produces exactly what I want - a list of printers and the trays that are available for that printer.

This test runs in under half a second in a 32 bit compilation, but when I switch to 64 bit, the test takes at least 15 seconds! Has anyone any idea why it would be so slow? Is there a way to avoid using the frxPrinter object, and get the same results using the Windows API?

uses
..., frxPrinter;

procedure TfrmTest.Button1Click(Sender: TObject);
var
aRpt: TfrxPrinters;
i, j: integer;
stop, start: TDateTime;
begin
start := Now;
aRpt := TfrxPrinters.Create;
try
for i := 0 to aRpt.Printers.Count-1 do
begin
for j := 0 to aRpt.Items.Bins.Count-1 do
ListBox1.Items.Add(aRpt.Items.Name + '-' + aRpt.Printer.Bins[j]);
end;
finally
aRpt.Free;
end;
stop := Now;
ListBox1.Items.Add('Elapsed time (nn:ss:zz): ' + FormatDateTime('nn:ss:zz', stop - start));
end;

The TDateTimes and ListBox are only to illustrate the problem. I should add that the 64 bit library path looks at C:\Program Files (x86)\FastReports\LibD22x64, whereas the 32 bit path is C:\Program Files (x86)\FastReports\LibD22.

Regards, Peter

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.