WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
126077
Rewrite Text node attaching to not be N^2 in HTML parser
https://bugs.webkit.org/show_bug.cgi?id=126077
Summary
Rewrite Text node attaching to not be N^2 in HTML parser
Ryosuke Niwa
Reported
2013-12-20 11:38:11 PST
Consider merging
https://chromium.googlesource.com/chromium/blink/+/4a1cb7c3ac3015f577bb04fe60dac68df478e70b
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2016-01-11 11:36:36 PST
Was this ever evaluated? Can we close this bug if we don't think this is relevant or useful for us?
Ryosuke Niwa
Comment 2
2016-01-11 13:28:04 PST
Antti, didn't you fix this?
Antti Koivisto
Comment 3
2016-01-12 06:03:21 PST
No, I haven't done anything with text nodes. The blink commit doesn't indicate if this was an observed problem rather than a theoretical one. As far as I see this isn't an actual O(n^2) because we limit the text node length to 64k characters and split them up as needed.
Ahmad Saleem
Comment 4
2023-09-26 18:55:36 PDT
@Chris - something needed?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug