Changeset 16821 in webkit


Ignore:
Timestamp:
Oct 5, 2006 2:40:04 PM (18 years ago)
Author:
bdash
Message:

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:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r16820 r16821  
     12006-10-05  David Carson  <dacarson@gmail.com>
     2
     3        Reviewed by Darin.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=11152
     6        Adjust the tokenizer chunk size to be smaller for
     7        mobile devices, and also decrease the yield timer
     8        for the tokenizer so that it can resume earlier.
     9
     10        * html/HTMLTokenizer.cpp:
     11        * config.h:
     12
    1132006-10-05  Adam Roben  <aroben@apple.com>
    214
  • trunk/WebCore/config.h

    r16353 r16821  
    2222
    2323#define XSLT_SUPPORT 1
     24#define MOBILE 0
    2425
    2526#if __APPLE__
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r16405 r16821  
    4747// #define INSTRUMENT_LAYOUT_SCHEDULING 1
    4848
     49#if MOBILE
     50// The mobile device needs to be responsive, as such the tokenizer chunk size is reduced.
     51// This value is used to define how many characters the tokenizer will process before
     52// yeilding control.
     53#define TOKENIZER_CHUNK_SIZE  256
     54#else
    4955#define TOKENIZER_CHUNK_SIZE  4096
     56#endif
    5057
    5158using namespace std;
     
    5663using namespace EventNames;
    5764
     65#if MOBILE
     66// As the chunks are smaller (above), the tokenizer should not yield for as long a period, otherwise
     67// it will take way to long to load a page.
     68const double tokenizerTimeDelay = 0.300;
     69
     70#else
    5871// FIXME: We would like this constant to be 200ms.
    5972// Yielding more aggressively results in increased responsiveness and better incremental rendering.
    6073// It slows down overall page-load on slower machines, though, so for now we set a value of 500.
    6174const double tokenizerTimeDelay = 0.500;
     75#endif
    6276
    6377static const char commentStart [] = "<!--";
Note: See TracChangeset for help on using the changeset viewer.