You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah this issue has been reported before. For the DOM it is highly beneficial to group things like this to prioritize creation over updates since updates are usually not expensive. The logic for the universal renderer is identical to that. The other difference I suppose is that the DOM only has simple values in props so the equality check is sufficient to shortcut things being called multiple times. Of course it is difficult to make that assumption across multiple environments either way. I'd love to get more feedback like this from other universal renderer users.
We generally recommend to createMemo around expensive operations which would avoid the cost here but obviously not having to worry about it is great. Then again if the compiler individually wraps everything that is a lot of overhead in some scenarios and the developer wouldn't be able to opt out in the way you can opt in.
Describe the bug
Compiler for custom renderer always batch many attribute expression in one effect, which cause that any one of them update, the others update together.
Like this:
`
return (()=>{
const _el$ = _$createElement("container")
, _el$2 = _$createElement("container")
, _el$3 = _$createElement("sprite")
, _el$4 = _$createElement("sprite")
, _el$5 = _$createElement("sprite")
, _el$6 = _$createElement("container")
, _el$7 = _$createElement("sprite")
, _el$8 = _$createElement("sprite")
, _el$9 = _$createElement("sprite")
, _el$10 = _$createElement("container");
`
When only -props.scrollTop change, _v$~_v$14 are called together. Some of them are costly, which makes system slow.
Your Example Website or App
https://playground.solidjs.com/anonymous/7df3bddd-51c0-4d9c-9fb4-0d9115269bbe
Steps to Reproduce the Bug or Issue
1.Visit the website palced
2.Check for the output file
3.Will shows the same result in the browser
Expected behavior
Is this a Agreement or Feature? How Can I improve about this?
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: