Hey guys, it looks like there's an issue with Partytown when using atomics. We encounter the error (see photo attached) fairly regularly in our error logs - particularly on Android Chrome devices.
It looks like it's related to the following code: https://github.com/BuilderIO/partytown/blob/ab532e6ed6586bee30072a80d7379ac7d3eae240/src/lib/atomics/sync-create-messenger-atomics.ts#L12-L13
Is there a reason why 1gb of memory is being allocated straight up? I would consider making this initialisation much smaller and utilising the maxByteLength property in the options to allow up to something more reasonable (say 100mb).
For example:
new SharedArrayBuffer(1024, { maxByteLength: 1024*1024} );
Describe the bug
Hey guys, it looks like there's an issue with Partytown when using atomics. We encounter the error (see photo attached) fairly regularly in our error logs - particularly on Android Chrome devices. It looks like it's related to the following code: https://github.com/BuilderIO/partytown/blob/ab532e6ed6586bee30072a80d7379ac7d3eae240/src/lib/atomics/sync-create-messenger-atomics.ts#L12-L13 Is there a reason why 1gb of memory is being allocated straight up? I would consider making this initialisation much smaller and utilising the maxByteLength property in the options to allow up to something more reasonable (say 100mb). For example:
new SharedArrayBuffer(1024, { maxByteLength: 1024*1024} );
Reproduction
https://www.youi.com.au/
Steps to reproduce
On Android Chrome browsers (check browserstack android V9), navigate to https://www.youi.com.au and the console error will be present.
Browser Info
Android Chrome
Additional Information
No response