Thread: Frequent hard drive access question

  1. #1
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107

    Frequent hard drive access question

    I worte a control with a hexeditor-like display that read a file from the hard disk, but the way I have it set up now it has to re-read the information it's displaying from the hard disk each time it gets redrawn. Now I imagine if the data really does get re-read each time it would put uneccessary strain on the drive, but does windows keep the data cached in memory for a short time so it won't have to access the HD uneccessarily? If it does then I won't have to rewrite that portion of the code .

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    There is some level of caching in modern filesystems.
    Profile the code. If it doesn't perform as well as you would like, then rewrite it.

    Or rewrite it better, just for the love writting code.

    gg

  3. #3
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107
    Well, it preforms just fine speed wise. I'd rather not rewrite this particular piece of code because I've been working on this control to long as it is, and besides, if it ain't broke then don't fix it .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 11-26-2004, 08:13 PM
  2. File I/O on Network drive, Quick Question
    By kransk in forum C++ Programming
    Replies: 3
    Last Post: 11-24-2003, 09:17 AM
  3. Getting the hard drive serial number?
    By kes103 in forum Windows Programming
    Replies: 2
    Last Post: 01-18-2002, 03:03 PM
  4. Getting the hard drive serial number?
    By kes103 in forum C Programming
    Replies: 2
    Last Post: 01-18-2002, 01:43 PM
  5. Math Question, hard
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 12-08-2001, 11:58 AM