Closed WangLarry closed 1 year ago
Thanks for reporting this issue @WangLarry. Not sure how plausible it would be to not to wrap each component with this - we'd also have to measure how much this is affecting performance to see if it's worth tackling.
I believe it's needed at runtime because we want to be able to show error information on a per-component basis, even in the application runtime. This to avoid crashing the whole application and losing context of where an error is happening.
NodeRuntimeContext inside of it is unnecessary.
NodeRuntimeContext inside of it is unnecessary.
At the moment, it's indeed only used by the editor. But unless there's a significant measurable performance hit, I think we can live with it, the context value should be stable for the lifetime of the component, so I don't expect there to be any problem. I believe there are more important performance issues to focus on in the application runtime.
Duplicates
Latest version
Current behavior π―
NodeRuntimeWrapper wrap children with ErrorBoundary and NodeRuntimeContext. It maybe bring a little performance loss for one node. But it is common that there are over 30 nodes in one page of real app.
Expected behavior π€
No response
Steps to reproduce πΉ
Steps:
1. 2. 3. 4.
Context π¦
No response
Your environment π
No response