New issue
Advanced search Search tips
Starred by 6 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 545318



Sign in to add a comment

[css-typed-om] Improve performance of CSS Typed OM

Project Member Reported by shend@chromium.org, Feb 5 2018

Issue description

Tracking bug for performance improvements in CSS Typed OM. The faster Typed OM is, the greater adoption we will see!
 

Comment 1 by shend@chromium.org, Feb 5 2018

Link to some benchmarks: https://github.com/w3c/css-houdini-drafts/issues/634
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/369fded22b179d683bd949e34592becc897f3c08

commit 369fded22b179d683bd949e34592becc897f3c08
Author: Darren Shen <shend@chromium.org>
Date: Thu Feb 08 07:39:00 2018

[css-typed-om] Make styleMap.get slightly faster.

This patch specializes the styleMap.get function to be fast in the
happy case of retrieving a non-list property. No change in behaviour.
Improves performance by 2-3%.

Fixed an issue involving background-image. background-image should
be a list valued property, but was not marked as such. It worked
before because .get treated list-valued and non-list valued the
same way. But now we have a special code path for non-list valued
that only works for non-list valued, so any list-valued properties
that are not marked as such will break.

Fixed another issue with align-items (see comment in code).

Bug: 808933
Change-Id: I91ebccda69c5f6ec380f1510fd5acf3b9feb6710
Reviewed-on: https://chromium-review.googlesource.com/899410
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535328}
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/background-image.html
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/properties/property-suite.js
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/Source/core/css/CSSProperties.json5
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/Source/core/css/cssom/StylePropertyMapReadOnly.cpp
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.cpp
[modify] https://crrev.com/369fded22b179d683bd949e34592becc897f3c08/third_party/WebKit/Source/core/css/cssom/StyleValueFactory.h

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7c76f7926ac08f72f3b11f5cc39fab1b49c25632

commit 7c76f7926ac08f72f3b11f5cc39fab1b49c25632
Author: Darren Shen <shend@chromium.org>
Date: Fri Feb 09 04:10:42 2018

[css-typed-om] Don't use mutable property value set unnecessarily.

We currently call EnsureMutableInlineStyle() when calling styleMap.get,
even though we don't need it to be mutable. EnsureMutableInlineStyle()
also has some overhead of copy-on-write. This patch just calls
InlineStyle() instead, which should be slightly faster as well.

Bug: 808933
Change-Id: I3f0db400b896a0be3888e61bdd8dd80783f7225c
Reviewed-on: https://chromium-review.googlesource.com/910168
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535630}
[modify] https://crrev.com/7c76f7926ac08f72f3b11f5cc39fab1b49c25632/third_party/WebKit/Source/core/css/cssom/InlineStylePropertyMap.cpp

Cc: shend@chromium.org
Owner: ----
Status: Available (was: Started)
No longer working on Typed OM, marking as Available. Still lots of room for improvement!

Sign in to add a comment