Yaffle / EventSource

a polyfill for http://www.w3.org/TR/eventsource/
MIT License
2.11k stars 338 forks source link

React Native IOS App crashes while handling large data size using SSE. #227

Open kiranonline opened 6 months ago

kiranonline commented 6 months ago

I'm encountering crashes in my React Native iOS app (running on an iPhone 13 with iOS 17) when serving large data packets via SSE using the 'event-source-polyfill'. The crashes coincide with sudden spikes in RAM consumption, as monitored using React Native's perf monitor. With multiple stream hits, the app exhibits incremental memory consumption before eventually crashing. The error message I've found in the code is 'com.facebook.react.JavaScript (14): EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=2098 MB)'. How can I optimize memory usage and address these crashes?

pjoaog commented 4 months ago

Did you find any solution? I have an Ionic/Angular project that constantly closes, but when emulating it through the browser it works correctly.