ClientDataset is terribly slow sometimes.<br><br>I am using a Virtual Memory Table called TVirtualTable which came with SDAC from crlabs<br><br>I was able to run a Query on a middle tier that loaded 40,000 items of about 20 fields into a virtual table,
<br>stream the virtual table to a string, send it over a tcp socket on localhost, reconvert stringstream back to a virtual table and display it. Total time was 4 seconds. (in a virtual machine)<br><br><div class="gmail_quote">
On Dec 6, 2007 3:35 PM, John Bird <<a href="mailto:johnkbird@paradise.net.nz">johnkbird@paradise.net.nz</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I want to use TClientDataSet for data that is NOT in a database.<br><br>Just reading the data from a file, eg for 15000 records, takes much less<br>than a second, but reading the data and inserting several fields into a<br>
client dataset in a simple loop takes a lot longer, eg 6 seconds or more for<br>the same 15000 records.<br><br>The code I am using is like:<br><br> with tbData do<br> begin<br> append;<br> fieldbyname('FieldName1').asInteger:=Number1;
<br> fieldbyname('FieldName2').asInteger:=Number2;<br> fieldbyname('FieldName3').asInteger:=Number3;<br> fieldbyname('Name').asString:=Name;<br> fieldbyname('Desc').asString:=Desc;
<br> post;<br> end;<br><br>I would like to speed this up, as I have seen that reading similar data from<br>a Database eg with a query is much faster. Any suggestions to speed this<br>up?<br><br>I already have lines in such as
<br><br> tbdata.DisableControls;<br> tbdata.EnableControls;<br><br>Before and after I start reading the data to stop screen updates....<br><br>John<br><br><br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list
<br>Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to
<a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br><br clear="all"><br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821