Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: webkit/glue/webkit_glue.h

Issue 6532012: Set the minimum timer interval on a per-page basis, and adjust it when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/webkit_glue.h
===================================================================
--- webkit/glue/webkit_glue.h (revision 75215)
+++ webkit/glue/webkit_glue.h (working copy)
@@ -46,7 +46,16 @@
namespace webkit_glue {
+// Chromium sets the minimum interval timeout to 4ms, overriding the
+// default of 10ms. We'd like to go lower, however there are poorly
+// coded websites out there which do create CPU-spinning loops. Using
+// 4ms prevents the CPU from spinning too busily and provides a balance
+// between CPU spinning and the smallest possible interval timer.
+const double kForegroundTabTimerInterval = 0.004;
darin (slow to review) 2011/02/17 06:42:32 i'm tempted to pull these constants out of webkit_
Ken Russell (switch to Gerrit) 2011/02/18 01:05:54 Sure, good idea. Done.
+// Provides control over the minimum timer interval for background tabs.
+const double kBackgroundTabTimerInterval = 0.004;
+
//---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE -----------------------------
void SetJavaScriptFlags(const std::string& flags);

Powered by Google App Engine
This is Rietveld 408576698