Performance evaluation of reading/writing data from CSV and Excel in C sharp

Recently I did a performance evaluation(not part of my plan) on the performance In reading CSV and Excel files and there was a clear winner. I did this test because I had to process a hell lot of data which was given to me was in excel format. I used C# as my platform to start and immediately I found some libraries such as Interop to help me out. It was pretty easy. At the beginning I used only a small portion of the data and when I started using the original files which has like thousands of records, it started to take a lot of time. So I has a preprocessing function where I write this data to a CSV file. And when I started to read from the CSV, it was very fast. Instead of taking some five minutes, now it take less than 10 seconds. I used the csvHelper lib to help me out and it was pretty easy. Even though it might be a one time execution in the production system, while you are doing the coding you might have to execute it a hundred times. So I would suggest to convert it into a CSV and then do the development.

Comments

Popular posts from this blog

How To Install LEX and YACC in Linux or Ubuntu

Lex Program To Check The Syntax of For Loop

Listing/Delisting of an article in to an Assortment in SAP SCM Retail