I'm receiving file from POP3 server and obviosly if i want to open that file later or save it to the hard drive i have to add the incoming data to a string variable.
CODE
string file;
//every time i receive data from the server i iterate through it
foreach(string s in dataFromServer)
{
file += blabla; //where 'blabla' is part of the received file,and of course this is done few thousand times,if not millions
}
The problem is that adding of strings to 'file' reduce the time for the receiving extremely.If i just receive the file without adding it to string it's about 25-30 seconds.The file that i'm receiving is 1300kb.25-30 seconds is ok,but i can't open(or save to disk) the file later.When i generate the file through adding the received data to 'file' the time for receiving is about 3 minutes or something like that.Is there a faster way to do what i want?How to generate the file faster(if it's possible)?
This post has been edited by cygnusX: 28 Mar, 2008 - 09:11 AM