<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>34059</bug_id>
          
          <creation_ts>2010-01-24 11:40:43 -0800</creation_ts>
          <short_desc>Content with heavily nested residual style is so slow, it seems like a hang</short_desc>
          <delta_ts>2010-01-24 20:11:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Maciej Stachowiak">mjs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dglazkov</cc>
    
    <cc>eric</cc>
    
    <cc>gustavo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>184089</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-01-24 11:40:43 -0800</bug_when>
    <thetext>Content with heavily nested residual style is so slow, it seems like a hang</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184090</commentid>
    <comment_count>1</comment_count>
      <attachid>47298</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-01-24 11:47:53 -0800</bug_when>
    <thetext>Created attachment 47298
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184091</commentid>
    <comment_count>2</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-01-24 11:51:59 -0800</bug_when>
    <thetext>I wasn&apos;t sure whether to provide a test case for this. The only test case I can think of would be annoyingly slow when it passes, and an outright hang when it fails. This means it would probably be on the edge of timing out on the bots, which is not so great.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184092</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-24 11:52:58 -0800</bug_when>
    <thetext>Attachment 47298 did not build on mac:
Build output: http://webkit-commit-queue.appspot.com/results/208763</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184093</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-01-24 11:59:50 -0800</bug_when>
    <thetext>Attachment 47298 did not build on chromium:
Build output: http://webkit-commit-queue.appspot.com/results/208767</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184095</commentid>
    <comment_count>5</comment_count>
      <attachid>47298</attachid>
    <who name="">mitz</who>
    <bug_when>2010-01-24 12:28:03 -0800</bug_when>
    <thetext>Comment on attachment 47298
Patch

&gt; +    while (!finished &amp;&amp; (iterationCount++ &lt; cResidualStyleIterationLimititerationLimit)) {

Typo: cResidualStyleIterationLimititerationLimit
and redundant parentheses, but otherwise r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184096</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-01-24 12:28:19 -0800</bug_when>
    <thetext>Attachment 47298 did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/209685</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184097</commentid>
    <comment_count>7</comment_count>
      <attachid>47298</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-01-24 12:31:53 -0800</bug_when>
    <thetext>Comment on attachment 47298
Patch

&gt; +        Limit the number of iterations of the main loop to 5.
&lt;...&gt;
&gt; +    while (!finished &amp;&amp; (iterationCount++ &lt; cResidualStyleIterationLimititerationLimit)) {

I think this actually limits the count to 6, not 5.

It would be nice to attach a test case to this Bugzilla bug, so that people could verify that it didn&apos;t regress - if it&apos;s not possible to make an automated test, of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184098</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-01-24 12:32:24 -0800</bug_when>
    <thetext>Attachment 47298 did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/208787</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184126</commentid>
    <comment_count>9</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-01-24 18:08:04 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (From update of attachment 47298 [details])
&gt; &gt; +        Limit the number of iterations of the main loop to 5.
&gt; &lt;...&gt;
&gt; &gt; +    while (!finished &amp;&amp; (iterationCount++ &lt; cResidualStyleIterationLimititerationLimit)) {
&gt; 
&gt; I think this actually limits the count to 6, not 5.

I think it&apos;s 5. The value being compared on iterations through the loop will be:

0
1
2
3
4
5 ==&gt; this breaks out of the loop before it executes.


&gt; 
&gt; It would be nice to attach a test case to this Bugzilla bug, so that people
&gt; could verify that it didn&apos;t regress - if it&apos;s not possible to make an automated
&gt; test, of course.

I&apos;ll see if I can make an automated test that hangs on release but reliably runs fast in debug.

Regards,
Maciej</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184129</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-01-24 18:32:46 -0800</bug_when>
    <thetext>D&apos;oh!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184144</commentid>
    <comment_count>11</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-01-24 20:11:54 -0800</bug_when>
    <thetext>Committed r53790: &lt;http://trac.webkit.org/changeset/53790&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47298</attachid>
            <date>2010-01-24 11:47:53 -0800</date>
            <delta_ts>2010-01-24 12:31:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-34059-20100124114752.patch</filename>
            <type>text/plain</type>
            <size>2353</size>
            <attacher name="Maciej Stachowiak">mjs</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1Mzc4MCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMjQgQEAKKzIwMTAtMDEtMjQgIE1hY2llaiBTdGFjaG93aWFrICA8bWpzQGFwcGxl
LmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBD
b250ZW50IHdpdGggaGVhdmlseSBuZXN0ZWQgcmVzaWR1YWwgc3R5bGUgaXMgc28gc2xvdywgaXQg
c2VlbXMgbGlrZSBhIGhhbmcKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19i
dWcuY2dpP2lkPTM0MDU5CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS83MjkyOTA2PgorICAgICAg
ICAKKyAgICAgICAgKiBodG1sL0hUTUxQYXJzZXIuY3BwOgorICAgICAgICAoV2ViQ29yZTo6SFRN
TFBhcnNlcjo6aGFuZGxlUmVzaWR1YWxTdHlsZUNsb3NlVGFnQWNyb3NzQmxvY2tzKToKKyAgICAg
ICAgTGltaXQgdGhlIG51bWJlciBvZiBpdGVyYX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ZXhpc3RzIGFub3RoZXIgaGln
aGVyLWxldmVsCiAgICAgICAgIC8vIGVsZW1lbnQsIHdlIHdpbGwgZG8gYW5vdGhlciBwYXNzLCB1
bnRpbCB3ZSBoYXZlIGNvcnJlY3RlZCB0aGUgaW5uZXJtb3N0IG9uZS4KICAgICAgICAgRXhjZXB0
aW9uQ29kZSBlYyA9IDA7Cg==
</data>
<flag name="review"
          id="29713"
          type_id="1"
          status="+"
          setter="mitz"
    />
          </attachment>
      

    </bug>

</bugzilla>