By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,088 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Arraylist Performance Issue

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" <da****@timeco.com> wrote in message
news:03****************************@phx.gbl...
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

Nov 20 '05 #2

P: n/a
* "Danny" <da****@timeco.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

P: n/a
Cor
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

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.