feat: Enhance optimizer to use _fnSignal for derived signal express…#8420
feat: Enhance optimizer to use _fnSignal for derived signal express…#8420JerryWu1234 wants to merge 3 commits intoQwikDev:build/v2from
_fnSignal for derived signal express…#8420Conversation
🦋 Changeset detectedLatest commit: 61eb8b9 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
| /*#__PURE__*/ _jsxSorted("div", null, null, globalThing.thing, 1, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, globalThing.thing + 'stuff', 1, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, globalThing, 3, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, _wrapProp(globalThing, "thing"), 3, null), |
| /*#__PURE__*/ _jsxSorted("div", null, null, dep, 3, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, dep.thing, 3, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, dep.thing + 'stuff', 3, null), |
There was a problem hiding this comment.
I think these can all be made into _fnSignal
| /*#__PURE__*/ _jsxSorted("div", null, null, globalThing.thing + 'stuff', 3, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, signal.value(), 1, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, signal.value + unknown(), 1, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, signal.value + unknown(), 3, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, mutable(signal), 1, null), | ||
| /*#__PURE__*/ _jsxSorted("div", null, null, signal.value + dep, 1, null) |
There was a problem hiding this comment.
these can also be turned into _fnSignal I think
There was a problem hiding this comment.
I tried some approaches, but it failed ..
|
I'm not sure what breaks if we just wrap all expressions into fnSignal, but I can't think of anything 🤔 |
We shouldnt wrap everything, because it means more vnode data and state to serialize, but idk if it breaks something |
|
@Varixo so we should wrap only things that aren't referenced in the component, right? For example, if a component uses foo.bar in the render function and in the jsx it also uses foo.bar, then we don't need to wrap but if it uses untrack(() => foo.bar) then we should wrap |
ce9ea78 to
1d28ca9
Compare
…ions and improve constant detection for safe global calls.
Fnsignal is jsx only, no? |
…ions and improve constant detection for safe global calls.
What is it?
Description
#4769
Checklist
pnpm change