Any indexes on the memory table? www.penrich.com PENRICH CAPITAL LTD PO Box 39-045, Christchurch, New Zealand Mobile: +64 21 0319794 Ph: +64 3 3602586 Fax: +64 3 3602587 Unauthorised copying, disclosure, distribution or retention of any confidential and/or privileged information in this email is strictly forbidden. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Bird Sent: Thursday, 6 December 2007 9:16 p.m. To: [EMAIL PROTECTED]; 'NZ Borland Developers Group - Delphi List' Subject: RE: [DUG] Speed of loading a Client DataSet
I tried a different loop using code like tbData.Fields[5].asString:=copy(Buffer,22,30); //name tbData.Fields[6].asString:=copy(buffer,52,30); //desc And found it was pretty much the same amount of time - that is eliminating the FieldByName seems to make no appreciable difference. In this case 66000 records take 36 seconds. The same procedures on a file with 15000 records take around 6 seconds, so there is an effect of it slowing down the larger the datasets get. John Hi John TDatset.FieldByName is slow - and you're repeating it 15,000X5 times. Much better to declare 5 TField type vars, use TDataSet.FindField or TDataSet.FieldByName to assign them prior to the loop. See how you get on. _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe