How to optimize fgets file read time
How to optimize fgets file read time
Hello,
I am reading a notepad file(contains matrix value datas) using following C programming
statement
fgets( cpReadString, 6144, fStream )
but due to '6144' count, it is taking three
seconds to read. I want to reduce the time to zero seconds, can somebody help me out to solve this issue.6 Dec 12, 12:46PM
Does you get a sensible speed if you use
fgets( cpReadString, 100, fStream )If so then do repeated calls to fgets until you've download the entire file. For a large file this is the normal approach, though I agree that for only 6144 bytes you should be able to read this all at once. Are you accessing across a network?