Yaffle / EventSource

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

EventSource causes IE11 to lock-up, freeze and act erratically with high-frequency EventSource in Angular 4 #104

Open daiplusplus opened 6 years ago

daiplusplus commented 6 years ago

I'm using this EventSource polyfill in an Angular 4 application that calls an EventSource that returns new messages every 500ms. When using IE11 on Windows Server 2016, the IE window (and dev tools!) instantly lock-up and become unresponsive for a few seconds, before resuming but lagging the entire system, including Windows Task Manager. Curiously, Windows Task Manager reports no unusual CPU usage, or significantly increased memory usage.

I ran it with the IE F12 Developer Tools Profiler, which shows a lot of time is spent in Angular's zone handler and change-detection code - so something very inefficient is going on in there. I speculate this polyfill is conflicting with Angular's Zone.js patching of XMLHttpRequest.

Has anyone else observed similar behaviour?

varioous commented 4 years ago

Same issue here. See https://seit1908.at/ticker/ticker.php?id=279&home=LASK&away=SV+Mattersburg

Yaffle commented 4 years ago

@varioous , it seems, your eventsource stream has a lot of whitespaces, such big respnose (like 1MB) are very slow in IE