Browse Source

FIX gh-378 Exit cache loop early (common case)

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 13 years ago
parent
commit
df20735c74
1 changed files with 3 additions and 0 deletions
  1. 3 0
      system/jlib/jfile.cpp

+ 3 - 0
system/jlib/jfile.cpp

@@ -6233,6 +6233,9 @@ public:
             if (!oldest)
                 break;
             oldest->cachedio.clear();
+            //If previously had max ios then we now have space.
+            if (n == max)
+                break;
         }
     }