Application is slow while writing data in to text files

Jul 19 2010 10:02 AM
Hello,
I am having a performance issue with one of my C#.NET console application. The application is faster(takes 10 mins) when it runs from our test environment, but slower on Production environment(takes 80 mins). The settings/Configurations are same between the two environments.The application reads a text file, which has 180K records, and splits it up into multiple text file based on a condition. I am attaching the code with this. Please give your valuable suggestions and help me resolve this.
In the sample code, I have used stream writer to write in to files. I tried with File.AppendText, BinaryWriter etc. But no change in the performance.

Thanks

Answers (1)