Hi. We are trying to turn on LWS on our production org, but we are encountering issue after issue.
We already refactored some of our custom LWC components, so that they perform better with LWS (mostly removing proxy wrapper from data retrieved using Apex).
Now we have issue with yet another component. It is a big one.
There is a lot of data rendered on the component and user has the ability to edit it.
I already made copy of the data using JSON.parse(JSON.stringify()) but it did not help.
On top of that, we are using barcodeScanner which is functionality provided by SF (mobileCapabilities).
Without LWS code scanning takes around 1 second to scan. With LWS it can take almost 10 times that!
And we do not have ability to refactor that method.
So I have a couple of questions:
- are there plans to fix barcodeScanner functionality with LWS enabled?
- are there any other ways to help with LWS performance on large LWC components? Besides mentioned above, avoiding sets and maps etc.
- this LWC component is used in flow and that flow is launched from LWC on app page. Could this also slow it down? (although parameters passed down from flow are only strings, not objects or arrays)
I'm not able to do that. The scanner does not work on desktop and I cannot debug component on mobile (SF app is not detected when using USB debugger with Chrome Inspect Tool). I tracked timing with JS code only.