Bug 516699 - Increase the interval between low-memory notifications. r=vlad
authorDoug Turner <dougt@meer.net>
Tue, 15 Sep 2009 11:33:53 -0700
changeset 32505 eb15507581d625557a0001359f42d67a53989267
parent 32504 a4e2df0a6af53597afcffd7dbfa2141f9a5e5789
child 32506 9c3a70ea7acf1cbec97427a319e674bc77818d3a
push id9128
push userdougt@mozilla.com
push dateTue, 15 Sep 2009 18:34:07 +0000
treeherdermozilla-central@eb15507581d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvlad
bugs516699
milestone1.9.3a1pre
Bug 516699 - Increase the interval between low-memory notifications. r=vlad
xpcom/base/nsMemoryImpl.cpp
--- a/xpcom/base/nsMemoryImpl.cpp
+++ b/xpcom/base/nsMemoryImpl.cpp
@@ -173,18 +173,18 @@ nsMemoryImpl::FlushMemory(const PRUnicha
     PRIntervalTime now = PR_IntervalNow();
 
     // Run the flushers immediately if we can; otherwise, proxy to the
     // UI thread an run 'em asynchronously.
     if (aImmediate) {
         rv = RunFlushers(aReason);
     }
     else {
-        // Don't broadcast more than once every 100ms to avoid being noisy
-        if (PR_IntervalToMicroseconds(now - sLastFlushTime) > 100) {
+        // Don't broadcast more than once every 1000ms to avoid being noisy
+        if (PR_IntervalToMicroseconds(now - sLastFlushTime) > 1000) {
             sFlushEvent.mReason = aReason;
             rv = NS_DispatchToMainThread(&sFlushEvent, NS_DISPATCH_NORMAL);
         }
     }
 
     sLastFlushTime = now;
     return rv;
 }