Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ReadFile() Problem Pin
Cedric Moonen31-Jan-11 4:47
Cedric Moonen31-Jan-11 4:47 
GeneralRe: ReadFile() Problem Pin
goldenrose931-Jan-11 6:01
goldenrose931-Jan-11 6:01 
GeneralRe: ReadFile() Problem Pin
goldenrose931-Jan-11 18:43
goldenrose931-Jan-11 18:43 
GeneralRe: ReadFile() Problem Pin
Cedric Moonen31-Jan-11 20:17
Cedric Moonen31-Jan-11 20:17 
GeneralRe: ReadFile() Problem Pin
goldenrose931-Jan-11 20:59
goldenrose931-Jan-11 20:59 
GeneralRe: ReadFile() Problem Pin
Cedric Moonen31-Jan-11 21:05
Cedric Moonen31-Jan-11 21:05 
QuestionHDD access chaotic speed problem. Pin
progDes31-Jan-11 2:06
progDes31-Jan-11 2:06 
AnswerRe: HDD access chaotic speed problem. Pin
User 742933831-Jan-11 2:35
professionalUser 742933831-Jan-11 2:35 
If you read and write data from the same disk from different files, the read-head will have to move to a different place on the disk, which is slow. If your input and output file are on different drives, this problem is solved. If you read and write alternatively (to the same physical disk) in your program each time, this slow down is maximum.
Note that some variation in disk speed can't be prevented in a multitasking OS where other programs might be using the disk too.

If your memory permits, you could consider reading the entire input file to memory at once at the beginning of your algorithm and then processing it and writing the results.

modified 13-Sep-18 21:01pm.

GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 2:49
progDes31-Jan-11 2:49 
AnswerRe: HDD access chaotic speed problem. Pin
User 742933831-Jan-11 2:59
professionalUser 742933831-Jan-11 2:59 
GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 3:36
progDes31-Jan-11 3:36 
GeneralRe: HDD access chaotic speed problem. Pin
User 742933831-Jan-11 3:39
professionalUser 742933831-Jan-11 3:39 
GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 2:51
progDes31-Jan-11 2:51 
QuestionRe: HDD access chaotic speed problem. Pin
David Crow31-Jan-11 2:54
David Crow31-Jan-11 2:54 
AnswerRe: HDD access chaotic speed problem. Pin
Andrew Brock31-Jan-11 3:04
Andrew Brock31-Jan-11 3:04 
GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 3:39
progDes31-Jan-11 3:39 
AnswerRe: HDD access chaotic speed problem. Pin
Niklas L31-Jan-11 21:09
Niklas L31-Jan-11 21:09 
GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 21:28
progDes31-Jan-11 21:28 
Questionwant to know meaning of line obj = ( struct xyz * ) ( buffer + offset ); Pin
VCProgrammer31-Jan-11 0:26
VCProgrammer31-Jan-11 0:26 
AnswerRe: want to know meaning of line obj = ( struct xyz * ) ( buffer + offset ); Pin
User 742933831-Jan-11 0:38
professionalUser 742933831-Jan-11 0:38 
GeneralRe: want to know meaning of line obj = ( struct xyz * ) ( buffer + offset ); Pin
Niklas L31-Jan-11 1:08
Niklas L31-Jan-11 1:08 
GeneralRe: want to know meaning of line obj = ( struct xyz * ) ( buffer + offset ); Pin
Graham Shanks31-Jan-11 2:24
Graham Shanks31-Jan-11 2:24 
AnswerRe: want to know meaning of line obj = ( struct xyz * ) ( buffer + offset ); Pin
Graham Shanks31-Jan-11 2:40
Graham Shanks31-Jan-11 2:40 
QuestionTransparent Color Pin
john563231-Jan-11 0:06
john563231-Jan-11 0:06 
AnswerRe: Transparent Color Pin
Niklas L31-Jan-11 1:17
Niklas L31-Jan-11 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.