Subject Performance
Author Robert martin
Hi All

Sorry if this is off topic, im not sure if there is a Firebird solution or if the IBO components can be tweaked.

I have been struggling to improve the performance in a large application I am converting from BDE/ DBase to Firebird. We are using IBOTable and IBOQuery components to speed the conversion process. I have discovered some code that is run frequently that is a real bottle neck. The code recalcs tax rates for each line item in a transaction. Currently to do this The code loops through each record like such...

with InvoiceItemTable do begin //This is an IBOTable component
try
DisableControls;

Post;
First;
while (Eof = False) do begin
Edit;
UpdateLineItem;
Post;

Next;
end;
finally
EnableControls;
end;
end;


The UpdateLineItem code, does the recalculation. It calls code that is in a class called from multiple places.

I know I could write an SQL to do the recalculation but we want control over rounding etc and have customized rounding routines. Is there a simple way to accelerate this code using the IBO components or should we look at writing a UDF in firebird to handle our rounding and do it with a query? I want to avoid re writting the entire screen at this time.

All suggestions welcome :)




Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com
Wild Software Ltd

[Non-text portions of this message have been removed]