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:
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user