+2006-10-05 David Carson <dacarson@gmail.com>
+
+ Reviewed by Darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11152
+ Adjust the tokenizer chunk size to be smaller for
+ mobile devices, and also decrease the yield timer
+ for the tokenizer so that it can resume earlier.
+
+ * html/HTMLTokenizer.cpp:
+ * config.h:
+
2006-10-05 Adam Roben <aroben@apple.com>
Removing accidentally-checked-in do-nothing code.
// #define INSTRUMENT_LAYOUT_SCHEDULING 1
+#if MOBILE
+// The mobile device needs to be responsive, as such the tokenizer chunk size is reduced.
+// This value is used to define how many characters the tokenizer will process before
+// yeilding control.
+#define TOKENIZER_CHUNK_SIZE 256
+#else
#define TOKENIZER_CHUNK_SIZE 4096
+#endif
using namespace std;
using namespace HTMLNames;
using namespace EventNames;
+#if MOBILE
+// As the chunks are smaller (above), the tokenizer should not yield for as long a period, otherwise
+// it will take way to long to load a page.
+const double tokenizerTimeDelay = 0.300;
+
+#else
// FIXME: We would like this constant to be 200ms.
// Yielding more aggressively results in increased responsiveness and better incremental rendering.
// It slows down overall page-load on slower machines, though, so for now we set a value of 500.
const double tokenizerTimeDelay = 0.500;
+#endif
static const char commentStart [] = "<!--";
static const char scriptEnd [] = "</script";