Skip to main content

We have performance issues on our orgs when turning on LWS. 

It is mostly seen on larger LWC components with a lot of logic. 

I belive this is due to js objects/arrays being wrapper in LWS proxy wrappers. 

I know SF documentation suggests using copies to mitigate this issue: 

const objectCopy = JSON.parse(JSON.stringify(object)); 

 

My question is, are there plans to fix this on LWS side? If yes, then when? Or will this workaround be a permanent required solution to the performance problem?

1 respuesta
  1. 4 ago 2025, 07:24

    My guess would be - There won't be any plans to fixing this issue. Given this is not an issue that can be resolved at all. LWS do not prefer passing attributes from one cmp to another in large number. And if this hierarchy is bigger then it becomes much more impactful as well. "Proxifying" objects for security has a cost, and this is the cost. And issue can only be resolved if platform don't Proxy it, which is not possible. 

     

    The solution however is to break the cmps to multiple. and don't pass attributes data through api params. Try to limit that as much as possible.

0/9000