Skip to content
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

fix: retargeting works as expected for innerHTML template modifications #739

Merged
merged 3 commits into from
Oct 16, 2018

Conversation

ekashida
Copy link
Member

Details

Retargeting regression for the case where event target was added via innerHTML.

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Contributor

@diervo diervo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/shrug

node = parentNodeGetter.call(node);
}
// either we hit the wall, or the node is root element (which does not have an owner key)
return (isUndefined(ownerKey) || isNull(node)) ? undefined : ownerKey;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can be optimized to just return ownerKey

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: ec410b9 | Target commit: 38d2747

lwc-engine-benchmark

table-append-1k metric base(ec410b9) target(38d2747) trend
benchmark-table/append/1k duration 153.80 (±5.90 ms) 152.50 (±5.00 ms) -1.3ms (0.8%) 👍
table-clear-1k metric base(ec410b9) target(38d2747) trend
benchmark-table/clear/1k duration 12.20 (±0.70 ms) 11.80 (±0.70 ms) -0.4ms (3.3%) 👍
table-create-10k metric base(ec410b9) target(38d2747) trend
benchmark-table/create/10k duration 875.40 (±5.50 ms) 877.30 (±6.05 ms) +1.9ms (0.2%) 👌
table-create-1k metric base(ec410b9) target(38d2747) trend
benchmark-table/create/1k duration 109.80 (±1.40 ms) 107.70 (±2.50 ms) -2.1ms (1.9%) 👍
table-update-10th-1k metric base(ec410b9) target(38d2747) trend
benchmark-table/update-10th/1k duration 90.60 (±7.25 ms) 83.65 (±2.35 ms) -6.9ms (7.7%) 👍
tablecmp-append-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-component/append/1k duration 209.25 (±11.80 ms) 212.60 (±14.10 ms) +3.3ms (1.6%) 👌
tablecmp-clear-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-component/clear/1k duration 19.95 (±2.20 ms) 18.15 (±2.10 ms) -1.8ms (9.0%) 👍
tablecmp-create-10k metric base(ec410b9) target(38d2747) trend
benchmark-table-component/create/10k duration 1644.45 (±11.55 ms) 1607.65 (±9.90 ms) -36.8ms (2.2%) 👍
tablecmp-create-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-component/create/1k duration 182.25 (±6.60 ms) 183.60 (±5.30 ms) +1.3ms (0.7%) 👌
tablecmp-update-10th-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-component/update-10th/1k duration 79.80 (±5.15 ms) 81.70 (±5.45 ms) +1.9ms (2.4%) 👌
wc-append-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-wc/append/1k duration 275.30 (±12.15 ms) 271.85 (±15.30 ms) -3.4ms (1.3%) 👌
wc-clear-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-wc/clear/1k duration 29.30 (±2.15 ms) 27.65 (±2.55 ms) -1.7ms (5.6%) 👍
wc-create-10k metric base(ec410b9) target(38d2747) trend
benchmark-table-wc/create/10k duration 2066.75 (±12.95 ms) 2050.10 (±10.10 ms) -16.7ms (0.8%) 👍
wc-create-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-wc/create/1k duration 222.65 (±4.65 ms) 222.65 (±5.05 ms) +0.0ms (0.0%) 👌
wc-update-10th-1k metric base(ec410b9) target(38d2747) trend
benchmark-table-wc/update-10th/1k duration 82.10 (±5.95 ms) 78.60 (±5.10 ms) -3.5ms (4.3%) 👌

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: ec410b9 | Target commit: 598bc59

lwc-engine-benchmark

table-append-1k metric base(ec410b9) target(598bc59) trend
benchmark-table/append/1k duration 153.80 (±5.90 ms) 153.25 (±4.60 ms) -0.6ms (0.4%) 👍
table-clear-1k metric base(ec410b9) target(598bc59) trend
benchmark-table/clear/1k duration 12.20 (±0.70 ms) 11.60 (±0.70 ms) -0.6ms (4.9%) 👌
table-create-10k metric base(ec410b9) target(598bc59) trend
benchmark-table/create/10k duration 875.40 (±5.50 ms) 863.10 (±7.10 ms) -12.3ms (1.4%) 👍
table-create-1k metric base(ec410b9) target(598bc59) trend
benchmark-table/create/1k duration 109.80 (±1.40 ms) 108.45 (±2.00 ms) -1.3ms (1.2%) 👍
table-update-10th-1k metric base(ec410b9) target(598bc59) trend
benchmark-table/update-10th/1k duration 90.60 (±7.25 ms) 97.20 (±1.75 ms) +6.6ms (7.3%) 👎
tablecmp-append-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-component/append/1k duration 209.25 (±11.80 ms) 220.20 (±13.50 ms) +10.9ms (5.2%) 👌
tablecmp-clear-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-component/clear/1k duration 19.95 (±2.20 ms) 19.65 (±1.85 ms) -0.3ms (1.5%) 👌
tablecmp-create-10k metric base(ec410b9) target(598bc59) trend
benchmark-table-component/create/10k duration 1644.45 (±11.55 ms) 1633.80 (±13.30 ms) -10.7ms (0.6%) 👍
tablecmp-create-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-component/create/1k duration 182.25 (±6.60 ms) 182.05 (±4.60 ms) -0.2ms (0.1%) 👌
tablecmp-update-10th-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-component/update-10th/1k duration 79.80 (±5.15 ms) 80.00 (±5.70 ms) +0.2ms (0.3%) 👌
wc-append-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-wc/append/1k duration 275.30 (±12.15 ms) 273.20 (±10.05 ms) -2.1ms (0.8%) 👌
wc-clear-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-wc/clear/1k duration 29.30 (±2.15 ms) 29.65 (±1.95 ms) +0.3ms (1.2%) 👌
wc-create-10k metric base(ec410b9) target(598bc59) trend
benchmark-table-wc/create/10k duration 2066.75 (±12.95 ms) 2047.35 (±12.70 ms) -19.4ms (0.9%) 👍
wc-create-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-wc/create/1k duration 222.65 (±4.65 ms) 220.85 (±4.75 ms) -1.8ms (0.8%) 👍
wc-update-10th-1k metric base(ec410b9) target(598bc59) trend
benchmark-table-wc/update-10th/1k duration 82.10 (±5.95 ms) 82.10 (±5.15 ms) 0.0ms (0.0%) 👌

@ekashida ekashida merged commit efa6a66 into master Oct 16, 2018
@ekashida ekashida deleted the retargeting-issue branch October 16, 2018 02:37
caridy pushed a commit that referenced this pull request Oct 19, 2018
…ns (#739)

* test: retargeting works as expected for innerHTML template modifications

* fix(engine): retargeting fix for non-signed elms

* fix(engine): small perf opt
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.

3 participants