New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 744203 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
style-dev-current


Sign in to add a comment

Optimize enums in ComputedStyle

Project Member Reported by nainar@chromium.org, Jul 17 2017

Issue description

This involves two tasks:

Generate efficient conversion functions between CSSValueID and ComputedStyleConstants.
In the style engine, we need to convert between two different enum types. We would like a more efficient conversion function, something like the original code in https://codereview.chromium.org/2513523002.
Please note: This is one optimizations strategy we want to explore. There are potentially other ways of optimizing your hosts and you can explore those as part of the Stretch Task 5.


Optimise ordering of keywords in ComputedStyleConstants.
This task involves finding the optimal ordering of keywords that maximises the gains from the optimisation you wrote in the previous task.

 

Comment 1 by nainar@chromium.org, Jul 19 2017

Components: Blink>CSS
Status: Started (was: Assigned)

Comment 2 by meade@chromium.org, Jul 20 2017

Labels: Performance Update-Monthly
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 20 2017

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

commit 58101af6954acc9e0e0c187bfc21ad68e5207478
Author: Minh-Duc Nguyen <nmduc@google.com>
Date: Thu Jul 20 03:34:18 2017

Reverse conversion optimization in CSSValueIDMappingsGenerated.h

This is an extension for CL https://chromium-review.googlesource.com/c/564903/.
In this patch,
we also replace the switchcase conversion code from CSS enum
to KeywordValue enum.
Gen diff: https://gist.github.com/nguyen-minh-duc/97f5a4942b006690bdc0f442f11dff12/revisions

https: //chromium-review.googlesource.com/c/564903/
Bug:  744203 
Change-Id: I11cc3467aaa4911ff948a570d3d076e59114750e
Reviewed-on: https://chromium-review.googlesource.com/572884
Commit-Queue: Minh-Duc Nguyen <nmduc@google.com>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488125}
[modify] https://crrev.com/58101af6954acc9e0e0c187bfc21ad68e5207478/third_party/WebKit/Source/build/scripts/templates/CSSValueIDMappingsGenerated.h.tmpl

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 26 2017

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

commit adebc87b91b31a8c7afba23309047808d6edf258
Author: Minh-Duc Nguyen <nmduc@google.com>
Date: Wed Jul 26 03:37:51 2017

Sort the individual enum type values

Sort the individual enum type values to match the 
order in CSSProperties.json5 enum values.
Currently the order of the keyword provided is also the
order of the enum values. By sorting these value to match
the CSSProperties enum we can extract all possible continuous
segment to use in CL 564903.
Generated enum: https://www.diffchecker.com/qtv8gu65
Generated conversion: https://www.diffchecker.com/kQ87XOtV
Generated diff summary:

Diff: 
https: //gist.github.com/nguyen-minh-duc/43cf0964d6620abe561310b5fa98d9d3/revisions
Bug:  744203 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: If3f2ec1082d2d1685555657703ad9777c5a3d67e
Reviewed-on: https://chromium-review.googlesource.com/566166
Commit-Queue: Minh-Duc Nguyen <nmduc@google.com>
Reviewed-by: Ali Juma <ajuma@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489543}
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/cc/input/scroll_boundary_behavior.h
[add] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/build/scripts/keyword_utils.py
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/build/scripts/make_css_value_id_mappings.py
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/adebc87b91b31a8c7afba23309047808d6edf258/third_party/WebKit/Source/core/layout/TextAutosizer.cpp

Comment 5 by nainar@chromium.org, Aug 30 2017

Owner: nmduc@chromium.org
Minh Duc, update the status here and close the bug?

Comment 6 by nmduc@chromium.org, Aug 30 2017

Done, the patch did what it supposed to do.

Comment 7 by nmduc@chromium.org, Aug 30 2017

Status: Fixed (was: Started)

Sign in to add a comment