I am working on large angular app and I have a couple of scroll listener to adjust positions. When user scroll in main browsers, all is good but in IE 11, the scrolling is delayed for about 1 second and it's incredibly slow.
When debugging, I isolated the problems and by removing scrolling listeners, it fixed the issue and the scrolling was smooth in IE. The problem is that even empty scroll listener is creating this unpleasant delay scrolling experience (also tried HostListener but obviously same result).
window.addEventListener('scroll', () => {
});
When I remove it or add zone.runOutsideAngular, all is fine
this.zone.runOutsideAngular(() => {
window.addEventListener('scroll', () => {
});
});
But our other app using similar modules (with some customization) is running fine without the zone.runOutsideAngular. So I wonder what is so different and I tried to isolate the problem further but couldn't find any clue. Is there any way how to debug the performance and find what is causing the slowdown and bad experience on scroll in IE?
Performance in IE11 on scroll:
Performance in Chrome on scroll is fine and pretty smooth:
Edit: The scroll event for a single scroll up to down is around 15x, very slowly appearing. Usually, it should be way more and quickly.