Bug 42921 - Save a per-character branch in the HTML parser
Summary: Save a per-character branch in the HTML parser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 17:56 PDT by Adam Barth
Modified: 2010-07-24 10:33 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2010-07-23 17:58 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-07-23 17:56:31 PDT
Save a per-character branch in the HTML parser
Comment 1 Adam Barth 2010-07-23 17:58:03 PDT
Created attachment 62479 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-07-23 20:09:03 PDT
Comment on attachment 62479 [details]
Patch

So I'm confused by the m_data.clear()s being moved to .clear().  When is ::clear() called?

I guess either the branch isn't actually that hot, or branch prediction is just winning out here.
Comment 3 Adam Barth 2010-07-23 20:17:57 PDT
> So I'm confused by the m_data.clear()s being moved to .clear().  When is ::clear() called?

Clear is called by the HTMLDocumentParser after each token.  It reset the token.  Before we were using lazy clearing where we delayed zeroing everything out until we started a new token.  I want to get rid of the branch, so i made this eager.

> I guess either the branch isn't actually that hot, or branch prediction is just winning out here.

Probably.  Or maybe moving the clear is costing us.  In any case, I think this is prettier.
Comment 4 WebKit Commit Bot 2010-07-23 21:42:29 PDT
Comment on attachment 62479 [details]
Patch

Rejecting patch 62479 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20715 test cases.
animations/play-state.html -> failed

Exiting early after 1 failures. 123 tests run.
12.72s total testing time

122 test cases (99%) succeeded
1 test case (<1%) had incorrect layout

Full output: http://queues.webkit.org/results/3623012
Comment 5 Eric Seidel (no email) 2010-07-24 07:53:27 PDT
Comment on attachment 62479 [details]
Patch

Bug 42821, again.
Comment 6 WebKit Commit Bot 2010-07-24 10:07:47 PDT
Comment on attachment 62479 [details]
Patch

Rejecting patch 62479 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20715 test cases.
animations/play-state.html -> failed

Exiting early after 1 failures. 123 tests run.
11.55s total testing time

122 test cases (99%) succeeded
1 test case (<1%) had incorrect layout

Full output: http://queues.webkit.org/results/3572410
Comment 7 Eric Seidel (no email) 2010-07-24 10:15:11 PDT
Comment on attachment 62479 [details]
Patch

Broken animation test. :(
Comment 8 Adam Barth 2010-07-24 10:21:38 PDT
The failure rate on that test is out of control.  Can we do something about it?
Comment 9 WebKit Commit Bot 2010-07-24 10:33:24 PDT
Comment on attachment 62479 [details]
Patch

Clearing flags on attachment: 62479

Committed r64010: <http://trac.webkit.org/changeset/64010>
Comment 10 WebKit Commit Bot 2010-07-24 10:33:29 PDT
All reviewed patches have been landed.  Closing bug.