Skip to content

Simplify lit-html benchmark code (without direct DOM manipulation) #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 18, 2019
Merged

Simplify lit-html benchmark code (without direct DOM manipulation) #523

merged 3 commits into from
Feb 18, 2019

Conversation

aomarks
Copy link
Contributor

@aomarks aomarks commented Feb 14, 2019

This is the same as PR #521, but without the controversial change involving directly setting a class on the table row.

A few simplifications to the lit-html benchmark implementations:

  • Minor style updates (semicolons etc.).
  • Update select and label properties in-place and remove guard directive, instead of creating new row objects every time.
  • Remove some unnecessary attributes and use closest() to find the action and row id.
  • Directly update row class on select instead of forcing an unnecessary render.

cc @justinfagnani @rictic @CaptainCodeman

Add semicolons, replace var with let, change some whitespace.
Previously a new row object was created on every select or update, in
order to force a render given that the guard directive was used.
However, it's simpler in this case to just not use the guard directive.
Removes some unnecessary attributes and uses closest() to find the
action and row id.
@krausest krausest merged commit dacc5f8 into krausest:master Feb 18, 2019
@krausest
Copy link
Owner

krausest commented Feb 18, 2019

Thanks a lot - results have been updated. Here's a screenshot:
bildschirmfoto 2019-02-18 um 20 15 49
Slightly better than the old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants