Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: String array comparison Pin
Stuart Rubin1-Feb-11 3:22
Stuart Rubin1-Feb-11 3:22 
AnswerRe: String array comparison Pin
thomas.michaud1-Feb-11 5:57
thomas.michaud1-Feb-11 5:57 
AnswerRe: String array comparison Pin
MarvinMartian1-Feb-11 13:47
MarvinMartian1-Feb-11 13:47 
QuestionReadFile() Problem Pin
goldenrose931-Jan-11 4:12
goldenrose931-Jan-11 4:12 
AnswerRe: ReadFile() Problem Pin
David Crow31-Jan-11 4:18
David Crow31-Jan-11 4:18 
GeneralRe: ReadFile() Problem Pin
goldenrose931-Jan-11 4:32
goldenrose931-Jan-11 4:32 
AnswerRe: ReadFile() Problem Pin
David Crow31-Jan-11 4:44
David Crow31-Jan-11 4:44 
GeneralRe: ReadFile() Problem Pin
goldenrose931-Jan-11 4:51
goldenrose931-Jan-11 4:51 
AnswerRe: ReadFile() Problem Pin
David Crow31-Jan-11 4:55
David Crow31-Jan-11 4:55 
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 
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 
There are countless factors that could be contributing to this.
I would guess that the major ones are file caching and delayed writes[^].

File Caching:
When a file is opened and read, its contents are loaded into RAM by the OS, and then sections are copied to your exe as you need them (usually in 4KB chunks which you then read smaller chunks from). Once the file is closed it is marked as unused but the OS, but is not removed from the RAM. If then another program needs heaps of memory the file will be removed from the RAM, however if this does not happen, and your file is still in the RAM then your program doesn't actually need to use the hard disk.
This is most notable if you open a program that uses lots of files on load, say MS Word. If you then close the program and open it again shortly after without opening something else the 2nd time you open the program it will load much quicker.

Delayed Writes:
These generally only occur to slow mediums such as USB memory sticks, however they can happen to HDD as well.
When you write to a file, and storage device is busy the data you write will often get written into a virtual file in RAM which is then written to the storage device at a later stage.

Other problems may include HDD head seeks (as mentioned by Thaddeus Jones) and other programs accessing the disk.

If you are running Windows vista or 7 then you can look at disk accesses with the Resource Monitor (resmon.exe)
GeneralRe: HDD access chaotic speed problem. Pin
progDes31-Jan-11 3:39
progDes31-Jan-11 3:39 

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.