When Move()ing, Remove()ing, or Close()ing a file opened for writing, update the cache when possible (RageFileDriverDirect) or invalidate the directory cache for the directory containing that file (everything else). Remove most of the FlushDirCache() calls as they are no longer needed. This fixes a long standing bug where files added into the cache were stat(2)ed O(n^2) times--that is, each file is stat(2)ed O(n) times.

This commit is contained in:
Steve Checkoway
2009-09-14 08:08:06 +00:00
parent b60a92e633
commit 76f0af145b
25 changed files with 140 additions and 106 deletions
+2 -1
View File
@@ -127,7 +127,8 @@ void ScreenOptionsManageCourses::BeginScreen()
}
m_vpCourses.clear();
FlushDirCache();
// XXX: Why are we flushing here?
FILEMAN->FlushDirCache();
PROFILEMAN->LoadMachineProfileEdits();
switch( EDIT_MODE.GetValue() )