[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream/daemon
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2012-07-30 17:54:40
Message-ID: 20120730175440.5FE73AC7A9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1308594 by lunakl:

keep native envs longer only if there aren't too many



 M  +3 -1      main.cpp  


--- trunk/icecream/daemon/main.cpp #1308593:1308594
@@ -870,11 +870,13 @@
             // ignore recently used envs (they might be in use _right_ now)
             int keep_timeout = 200;
             bool native = false;
-            // If it is a native environment, allow removing it only after a longer period.
+            // If it is a native environment, allow removing it only after a longer period,
+            // unless there are many native environments.
             for (map<string, NativeEnvironment>::const_iterator it2 = native_environments.begin();
                  it2 != native_environments.end(); ++it2 ) {
                 if (it2->second.name == it->first) {
                     native = true;
+                    if (native_environments.size() < 5)
                     keep_timeout = 24 * 60 * 60; // 1 day
                     break;
                 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic