Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it a good move to disable windows' file-caching capabilities (via I/O completion ports) for resource loading in a game environment? Most games will do their own resource management and caching anyways, so the OS will probably cache it a second time. Of course, you don't get the caching across the process' lifetime, but that's usually not a big downside. On the other hand, it probably makes file loading times more predictable - so you can actually give accurate load-time predictions.

share|improve this question
up vote 5 down vote accepted

Premature optimization is the root of much evil.

If your goal is loading-time prediction, I would say leave the OS file-caching in place. It's probably general, but well-written, so I would say that you shouldn't disable it unless:

  • You have a very good reason to do so, and
  • You can measurably prove that disabling it is beneficial in your case.

Otherwise, it's probably not worth the work; and in the worst case (average case?), you may even decrease efficiency.

share|improve this answer

I'd say no. Windows will be using spare memory for this caching - it's basically free. Unless you've got a fancy system to somehow expand your process memory to cache more data when Windows is under low load, and then contract it again when Windows decides it wants more memory, just let the computer do what it's good at it.

I don't think increasing load time in order to give better load-time predictions is a good tradeoff :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.