Most efficiant use of stringbuilder
From: Ryan McLean (Ryan.McLean_at_NAU.EDU)
Date: 09/01/04
- Next message: Cor Ligthert: "Re: Question: Java vs. vb.net development"
- Previous message: Jeff: "Low level control over network traffic."
- Next in thread: alaspin: "RE: Most efficiant use of stringbuilder"
- Reply: alaspin: "RE: Most efficiant use of stringbuilder"
- Reply: Russell Jones: "Re: Most efficiant use of stringbuilder"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: Most efficiant use of stringbuilder"
- Messages sorted by: [ date ] [ thread ]
Date: 1 Sep 2004 07:36:27 -0700
Hello everyone, I have a question for you. If I need to print 20,000
lines to a file which option is the most efficient?
(these are generated inside a datareader loop)
#1 Concatenate the data into a string variable, then write file at the
end of the loop (99.9% sure this is not it)
#2 Append the data into stringbuilder variable, then write file at the
end of the loop
#3 Append the data into stringbuilder variable, writing to the file
ever 500 or so records
#4 Don't use any variable, simply write directly to the file in every
iteration (99.9% sure this is not it either)
Thanks, I really appreciate your help. Have a great day!
Ryan
- Next message: Cor Ligthert: "Re: Question: Java vs. vb.net development"
- Previous message: Jeff: "Low level control over network traffic."
- Next in thread: alaspin: "RE: Most efficiant use of stringbuilder"
- Reply: alaspin: "RE: Most efficiant use of stringbuilder"
- Reply: Russell Jones: "Re: Most efficiant use of stringbuilder"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: Most efficiant use of stringbuilder"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|