Performance issues

G

guoqi zheng

Dear sir,

I have an application with a lot of disk access, IO read and write. The
application use out all my money and IO. I am thinking about ways to improve
disk read/write, what might be a solution? I used streamreader, readtoend to
get textfile and process it now? is there a better way?

I am thinking using c or c++ to write a file read/write component and use it
an my .net application to replace streamreader. Is this kind of approach
reasonable?

regards,

Guoqi Zheng
http://www.ureader.com
 
G

Guest

The overhead of streamreader/streamwriter is most commonly in the checks it
does on your strings. If you feel it is safe to avoid these checks, and you
feel comfortable programming in bits and bytes, a binaryReader is much
faster.

Yes, C or C++ might be much faster, but you still add tthe Interop
bottleneck, which may be more overhead than moving to a BinaryReader and
keeping in byes until the moment you need strings.

To give an example, on a previous project we manipulated files. Going
through millions of records with a StreamReader/StreamWriter type system took
around 12 minutes. Moving to keeping everything in bytes (BinaryReader) until
we actually needed to query strings pulled this down to under a minute. The
overhead we found was in the Reader/Writer ensuring a proper Unicode string,
which was not a necessity in our system.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top