Arraylist Performance Issue

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

I am writing a program that will connect to a device and
potentially retrieve 1000+ records at a time for
processing. Every record will get processed and saved in
a SQL Server database. I am planning of acomplishing this
by using an Arraylist to hold the records from the device
while they get processed. Is this the best way to do this
or would it be faster to save the records to table and
then process them from a recordset?

Thanks for the help!


Danny
 
You may want to use DataSet.WriteXML to create an XML file on the Device,
then when you sync the file, use DataSet.ReadXML to grab the data. Adding a
1000 values to an arraylist isn't inherently slow but I'm guessing the
device is using SQL Server CE which isn't the fastest thing you've come
across.

HTH,

Bill
 
* "Danny said:
I am writing a program that will connect to a device and
potentially retrieve 1000+ records at a time for
processing. Every record will get processed and saved in
a SQL Server database. I am planning of acomplishing this
by using an Arraylist to hold the records from the device
while they get processed. Is this the best way to do this
or would it be faster to save the records to table and
then process them from a recordset?

How does the device provide the records?
 
William,

The device I'm connecting to is a clock. I do believe it has some sort
of xml support but I have not fully read the specifications. I did get
from your email that dumping an xml file into a recordset is faster than
loading it into an arralist, is this correct?

Thanks for your help,


Danny
 
Hi Danny,

No the recordset is from before the XML time.
With the information we have now from you, I think also that Bills answer is
the best.

Cor
 
Back
Top