angular: Large Angular App is very slow in IE11, runs fine in Chrome or Firefox

Current behavior App is very slow in IE11. The initial app load takes up to 40 seconds.

Expected behavior We should have speed closer to Chrome or Firefox, not 2-3 times slower.

Minimal reproduction of the problem with instructions

Windows 7, Webstorm, gulp build, no lazy routing

  • Angular version: 2.0.X 2.0.2

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] IE11

  • Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript

  • Node (for AoT issues): node --version =
    Node 4.2.4

EDIT: (@benlesh)

A reproduction was provided in this comment.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 25
  • Comments: 39 (9 by maintainers)

Most upvoted comments

@sgentile … so why are you still using IE? Everyone who uses IE (and it doesn’t matter if it is a corporation or a person) and says he must do so, is doing it at the expense of everyone else because it prolongs required IE support and increases the cost of everyone else.

That is imo a very naive statement.

I don’t live in a world where I can dictate what people use. Granted, and fortunately those using IE are slowly diminishing over time.

There are costs to IT departments, organizations, etc… the reality is Microsoft created a very crappy browser but we are still stuck with it until enough time passes that it’s not required any longer.

@mlc-mlapis I don’t have any control what billion/million dollar corporations decide what browser they use. As far as I’m concerned if these businesses decide to use whatever browser than that is their decision not mine, my job is to provide a solution. We can’t just stick our heads in the sand and ignore something that is there.

We all probably think electric cars are better than gasoline, we all probably think US should use metric units of measure, etc… but the reality of the world is it’s not that simple.

My response here isn’t to debate the merits of not using IE, I certainly prefer Chrome and Firefox. I applied all the features as described above in my application (onPush, trackby, etc…) and it’s still at least 10x slower with IE11.

@mg-arrow in fact you need to apply various techniques to make your Angular application fast. Including: ChangeDetectionStrategy.OnPush, using trackBy in *ngFor, using manual manipulations with ChangeDetectorRef, debouncing your Rx streams, using enableProdMode in production, using manual chande detection in ngDoCheck to reduce heavy calculation, and of course bundle your app to single file.

You could check this guide as the starting point https://github.com/mgechev/angular-performance-checklist

@sgentile … it was not meant personally, for sure! But it isn’t a naive statement also. It is basically a statement, which says: I will save some money, and I don't care that it also means that everyone else is paying for it 1000 times more with a waste of time and money.

Because also here applies the basic principle: Freedom of one ends where the freedom of another begins. John Stuart Mill … it’s simply about a responsible behavior in the context of all the others around.

While arguing the merits of a single-browser world (I remember a time when IE was rad and everything else was lamented) nobody answered the god damn question.

Sad that the Angular2 devs act like this isn’t a problem - and it doesn’t take a ‘test app’ to see - it’s obvious.

I would agree as well that I shouldn’t need to totally alter the application just to make it perform at same level as other browsers

ie. if this is needed on every single component then maybe Angular2 needs to rethink it’s default behavior when it comes to components

“in fact you need to apply various techniques to make your Angular application fast. Including: ChangeDetectionStrategy.OnPush, using trackBy in *ngFor, using manual manipulations with ChangeDetectorRef, debouncing your Rx streams, using enableProdMode in production, using manual chande detection in ngDoCheck to reduce heavy calculation, and of course bundle your app to single file.”

I’m using OnPush, I have enabledProdMode - and the app is dreadfully slow in IE11 but fast in Chrome/Firefox (even Edge).

We have a react-based app also running very slow in IE11 but once the dev tools is opened it runs much faster. We observed that when not using dev tools, IE11 memory consumption is confined to a level and frequent garbage collection is happening. It turns out that symantec endpoint protection is limiting the memory that could be used by IE11(without dev tool opened) and therefore our app is so slow. Once the endpoint protection is switched off, everything works fine again. Thank you Symantec.

Ok so I see this actual issue eroded into an idealistic debate about browsers… I’m having this same issue under Edge, does anyone know the fix as of yet?

@mlc-mlapis, @Goldflow is absolutely right. Also, don’t forget government where change occurs very slowly, you’re forced to use IE 11, and you’re restricted from installing software that isn’t already provided through a predefined image.

@mlc-mlapis I think everyone would love to stop using IE … but in a lot of (ancient) corporate environments like telecom or banking, IE isn’t going away any time soon and we need to make our applications compatible.

I am hopeful for companies migrating to Windows 10 where Edge with it’s superior rendering engine is also there by default

Hey guys. Had a similar experience with IE11 and Edge. By using trackBy in my ngFor ( https://angular.io/api/common/NgForOf ) I had much faster update of DOM changes. From 4-5 seconds -> less than a second. Things run almost the same as with Chrome. I also use aot and onPush change detection.

@sgentile … sure, I understand your words very well in fact, but you are also saying the important fact everybody can make a small step ahead ... even you can buy an electric car and force the change a bit. 💪

And strictly technically … you would have to change the code of IE to make it faster … it is 10 years old thing and you can’t expect anything else … the only thing what you can do is that IE works somehow at least. It’s maximum.