  
        if (_dirtyContexts.empty()) {
 -        guard.wait();
-+        // check whether we got a wait timeout or a signal
++        uint64_t waitTime = useReducedWait ? reducedWaitTime : regularWaitTime;
++        // we'll wait for a signal or a timeout 
 +        gotSignal = guard.wait(waitTime);
++        
++        // use a reduced wait time in the next round because we seem to be idle
++        // the reduced wait time will allow use to perfom GC for more contexts
++        useReducedWait = ! gotSignal;
        }
  
        if (! _dirtyContexts.empty()) {
          context = _dirtyContexts.back();
          _dirtyContexts.pop_back();
++        useReducedWait = false;
++      }
++      else if (! gotSignal && ! _freeContexts.empty()) {
++        // we timed out waiting for a signal, so we have idle time that we can
++        // spend on running the GC pro-actively
++        // We'll pick one of the free contexts and clean it up
++        context = pickContextForGc();
++
++        // there is no context to clean up, probably they all have been cleaned up
++        // already. increase the wait time so we don't cycle to much in the GC loop
++        // and waste CPU unnecessary
++        useReducedWait =  (context != 0);
        }
-+
-+      if (context == 0 && ! gotSignal && ! _freeContexts.empty()) {
-+        // we timed out waiting for a signal
-+        // so we'll pop one of the free contexts and clean it up pro-actively
-+        context = _freeContexts.back();
-+        if (context != 0) {
-+          _freeContexts.pop_back();
-+        }
-+      }
      }
 +   
 +    // update last gc time   

diff --git a/arangod/V8Server/ApplicationV8.cpp b/arangod/V8Server/ApplicationV8.cpp
index e1b246d..c381f4e 100644
--- a/arangod/V8Server/ApplicationV8.cpp
+++ b/arangod/V8Server/ApplicationV8.cpp
@@ -1,5 +1,5 @@

   };
 
 }
@@ -106,6 +135,7 @@ ApplicationV8::ApplicationV8 (string const& binaryPath)
     _startupModules("js/modules"),
     _actionPath(),
     _gcInterval(1000),
+    _gcFrequency(10.0),
     _startupLoader(),
     _actionLoader(),
     _vocbase(0),
@@ -230,21 +260,30 @@ ApplicationV8::V8Context* ApplicationV8::enterContext () {
 ////////////////////////////////////////////////////////////////////////////////
 
 void ApplicationV8::exitContext (V8Context* context) {
