Summary: | [Shadow] Attaching children of a shadow host takes O(N^2) where N is the number of host children | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Shinya Kawanaka <shinyak> | ||||
Component: | DOM | Assignee: | Shinya Kawanaka <shinyak> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | dglazkov, ojan, webcomponents-bugzilla, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 103016 | ||||||
Attachments: |
|
Description
Shinya Kawanaka
2012-11-21 21:44:12 PST
I would like to upload benchmarks later. InsertionPoint::nextTo() takes O(N). and it's called in NodeRenderingContext::nextRenderer(), which is called O(N) times. So Element::attach() will be O(N^2). > #host children -> distribution time
> 100 -> 67 [us]
> 200 -> 203 [us]
> 300 -> 497 [us]
> 400 -> 1331 [us]
> 500 -> 2084 [us]
Sorry, this is not correct. distribution is O(N).
Created attachment 175610 [details]
Patch
Comment on attachment 175610 [details] Patch Attachment 175610 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14966355 New failing tests: platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html It seems just a flake. Let me add cq+ again. Comment on attachment 175610 [details] Patch Clearing flags on attachment: 175610 Committed r135689: <http://trac.webkit.org/changeset/135689> All reviewed patches have been landed. Closing bug. |