Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.