Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1196)

Issue 26129005: Rewrite Text node attaching to not be N^2 (Closed)

Created:
7 years, 2 months ago by eseidel
Modified:
7 years, 1 month ago
Reviewers:
abarth-chromium
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk, esprehn
Visibility:
Public.

Description

Rewrite Text node attaching to not be N^2 Previously Text node creation used String::append which was N^2. Now instead we use StringBuilder, batch up all the text from the network and then split it into Text nodes if necessary all at once. This should be a perf win for pages with large text nodes and slow networks. BUG=301981 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161488

Patch Set 1 #

Patch Set 2 : Now doesn't crash, just produces lots of 0x0 Text nodes #

Patch Set 3 : Still fails a foster-parenting test #

Patch Set 4 : Causes a few CSS failures. not sure why #

Patch Set 5 : Seems to actually work #

Total comments: 6

Patch Set 6 : Updated per abarth's comments #

Patch Set 7 : Flush for foriegn content also #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -70 lines) Patch
A + LayoutTests/svg/in-html/nested-scripts.html View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
A + LayoutTests/svg/in-html/nested-scripts-expected.txt View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
A + LayoutTests/svg/in-html/real-script-write.html View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
A + LayoutTests/svg/in-html/real-script-write-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/svg/in-html/script-write.html View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/html/parser/HTMLConstructionSite.h View 1 2 3 4 5 6 3 chunks +69 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLConstructionSite.cpp View 1 2 3 4 5 6 8 chunks +87 lines, -54 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.cpp View 1 2 3 4 5 6 4 chunks +14 lines, -7 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
eseidel
7 years, 2 months ago (2013-10-08 23:33:35 UTC) #1
eseidel
PTAL
7 years, 2 months ago (2013-10-10 23:48:58 UTC) #2
esprehn
https://codereview.chromium.org/26129005/diff/11001/Source/core/html/parser/HTMLConstructionSite.cpp File Source/core/html/parser/HTMLConstructionSite.cpp (right): https://codereview.chromium.org/26129005/diff/11001/Source/core/html/parser/HTMLConstructionSite.cpp#newcode342 Source/core/html/parser/HTMLConstructionSite.cpp:342: // document and that we'll always queue some additional ...
7 years, 2 months ago (2013-10-11 00:02:56 UTC) #3
abarth-chromium
Are you still looking for a review here, or are you splitting this up into ...
7 years, 2 months ago (2013-10-11 18:10:07 UTC) #4
eseidel
This is the last of the pieces. I believe it's ready to land.
7 years, 2 months ago (2013-10-11 18:11:02 UTC) #5
eseidel
So yes, please review.
7 years, 2 months ago (2013-10-11 18:11:26 UTC) #6
abarth-chromium
LGTM! Very nice. A few minor comments below. https://codereview.chromium.org/26129005/diff/11001/Source/core/html/parser/HTMLConstructionSite.cpp File Source/core/html/parser/HTMLConstructionSite.cpp (right): https://codereview.chromium.org/26129005/diff/11001/Source/core/html/parser/HTMLConstructionSite.cpp#newcode342 Source/core/html/parser/HTMLConstructionSite.cpp:342: // ...
7 years, 2 months ago (2013-10-11 18:54:04 UTC) #7
eseidel
Turns out I have a bug. http://pastebin.com/S3rPcgRa it's attempting to execute document.write( which seems wrong.
7 years, 2 months ago (2013-10-16 18:30:56 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/26129005/27001
7 years, 1 month ago (2013-11-07 01:14:09 UTC) #9
commit-bot: I haz the power
7 years, 1 month ago (2013-11-07 05:59:07 UTC) #10
Message was sent while issue was closed.
Change committed as 161488

Powered by Google App Engine
This is Rietveld 408576698