reading record quick enough, i speed up?


this proceed i review file:



    open stationary twine readfile(string path)
{
stringbuilder stringfromfile = new stringbuilder();
streamreader sr;
twine s;
sr = file.opentext(path);
s = sr.readline();
while (s != null)
{
stringfromfile.append(sr.readline());
}
sr.close();
relapse stringfromfile.tostring();
}


the problem enlarged (the .txt record 2.5 megs). took over 5 minutes. there improved way?



solution taken



    open stationary twine readfile(string path)
{

relapse file.readalltext(path);

}


took reduction 1 second... :)



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?