<?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>60350</bug_id>
          
          <creation_ts>2011-05-06 00:38:16 -0700</creation_ts>
          <short_desc>run_webkit_tests_unittest.MainTest is very slow</short_desc>
          <delta_ts>2012-03-12 18:24:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Adam Barth">abarth</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dpranke</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>399390</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-05-06 00:38:16 -0700</bug_when>
    <thetext>run_webkit_tests_unittest.MainTest accounts for 57% of the total running time of test-webkitpy even though it only accounts for 5.4% of the tests:

$ ./Tools/Scripts/test-webkitpy  webkitpy.layout_tests.run_webkit_tests_unittest.MainTest
Ran 56 tests in 14.183s

$ ./Tools/Scripts/test-webkitpy  webkitpy.layout_tests.run_webkit_tests_unittest.MainTest
Ran 1036 tests in 24.807s

I don&apos;t know why these tests are so slow, but there&apos;s something wrong with them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399567</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-05-06 09:42:52 -0700</bug_when>
    <thetext>Sorry:

$ ./Tools/Scripts/test-webkitpy
Ran 1036 tests in 24.807s</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399716</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-05-06 12:19:57 -0700</bug_when>
    <thetext>This bug does not depend on 60354 or vice versa. I am clearing the field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399746</commentid>
    <comment_count>3</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-05-06 12:59:10 -0700</bug_when>
    <thetext>There is a time.sleep() in layout_tests/manager.py that is there to avoid what appears to be some sort of race condition when we spawn off a bunch of DumpRenderTrees when running the real tests. This accounts for ~7 seconds, and we could push this down to a port-specific hook to be mocked out when running the unittests.

That&apos;s the only really obvious thing in the profiling stats.

I think the combination of moving to the new manager/worker model and the fact that we&apos;ve been gradually accumulating more tests that get executed for each combination of flags to NRWT accounts for the rest of the slowness. There&apos;s simply a lot of different test paths to execute, and these tests do a lot of work to cover them all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399751</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-05-06 13:06:49 -0700</bug_when>
    <thetext>Another perspective is that this test suite is taking a poor approach to testing this code and that this code is not well-designed for testability.  Unfortunately, I don&apos;t think this is the right moment to refactor NRWT for testability because actually turning it on for the rest of the project is a higher priority.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>576857</commentid>
    <comment_count>5</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-03-12 18:24:19 -0700</bug_when>
    <thetext>it&apos;s much faster now :). Closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>