-
Notifications
You must be signed in to change notification settings - Fork 400
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
perf: apply static parts optimization to dynamic attributes #4055
Conversation
…ntent-optimization
...s/@lwc/template-compiler/src/__tests__/fixtures/attributes/attribute-crossorigin/expected.js
Outdated
Show resolved
Hide resolved
@@ -84,8 +84,9 @@ function ssf(slotName: unknown, factory: (value: any, key: any) => VFragment): V | |||
} | |||
|
|||
// [st]atic node | |||
function st(fragment: Element, key: Key, parts?: VStaticPart[]): VStatic { | |||
function st(fragmentFactory: () => Element, key: Key, parts?: VStaticPart[]): VStatic { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is needed in the second PR but causes several changes to the template compiler fixtures, see the test fixtures for details.
@@ -15,7 +15,7 @@ const stc3 = { | |||
function tmpl($api, $cmp, $slotset, $ctx) { | |||
const { sp: api_static_part, st: api_static_fragment } = $api; | |||
return [ | |||
api_static_fragment($fragment1(), 0, [ | |||
api_static_fragment($fragment1, 0, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly the change to all the template compiler fixtures, the invocation happens in the st function now so all the fixtures are updated like this.
@nolanlawson looks like I'm running into the LWC v5 vs v6 issue identified in #3974, do you know how long we intended to support the two versions? Should I create a patch for similar to #3973 for this? |
@jmsjtu It should be safe to remove now. I can do that in a separate PR. |
...plate-compiler/src/__tests__/fixtures/attributes/scoped-id/expression/not-scoped/actual.html
Show resolved
Hide resolved
Going through the nucleus logs, it appears there may be a bug with static content and See #4081 for details. |
Details
This is part 1 of 2 to apply static parts optimization to dynamic attributes as part of #3624.
This first PR handles a few minor refactors that modifies several test fixture in the template compiler.
I'm splitting this PR in 2 to make it easier to review.
There main changes in this PR:
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
The follow-up PR introduces an observable change in SSR.
GUS work item
W-15174789