Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

IE10 is very slow on 0.8.4 #691

Closed
prystoynyy opened this issue Mar 21, 2017 · 52 comments · Fixed by #704
Closed

IE10 is very slow on 0.8.4 #691

prystoynyy opened this issue Mar 21, 2017 · 52 comments · Fixed by #704

Comments

@prystoynyy
Copy link

I have got this problem when upgrade zone.js from 0.7.2 to 0.8.4

IE is very slow through function attachZoneAndRemoveInternalZoneFrames(error)

screen shot 2017-03-21 at 3 52 07 pm

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , thank for posting the issue, we are discussing this issue now.

@AndriiDidkivsky
Copy link

Have same issue with IE.

@YevheniiKasian
Copy link

Hi all, same problem.

@sod
Copy link

sod commented Mar 22, 2017

Might has been fixed in 0.8.5 / #690

@JiaLiPassion
Copy link
Collaborator

yes, it has been fixed in 0.8.5

@prystoynyy
Copy link
Author

Sorry, but it hasn't been fixed. IE still very slow.

screen shot 2017-03-22 at 12 40 29 pm

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , I will do some test, now the source has been rollback to the version as the same as
0.7.x, so the performance should be same as before.

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , could you post your test repository?

@Ks89
Copy link

Ks89 commented Mar 25, 2017

Hi.
I have exactly the same problem with IE 11 and Angular 4.0.0.

I can't share my code, because it's copyrighted, but I can share these screenshots:

Debug mode

debug interface
debug_profiler

Production mode

production

As you can see, the first photo shows a weird behaviour. The second one shows a huge impact over performances. 75 seconds :(

The funny thing is that it is happening only if Angular is running in debug mode. With production or production+aot everything is ok (photo 3) and it is quite fast.

This problem happens while starting my application, but also at every page change.

@Ks89
Copy link

Ks89 commented Mar 25, 2017

It can be related to this #698
I'm not sure, it's only an idea. :)

@JiaLiPassion
Copy link
Collaborator

@Ks89 , if in Debug mode, remove long-stack-trace-zone.js from polyfill.ts, can you check the performance result?

@Ks89
Copy link

Ks89 commented Mar 25, 2017

@JiaLiPassion Ok.
I'll check Monday morning, because at the moment I cannot access to the source code.

@JiaLiPassion
Copy link
Collaborator

@Ks89, sure, thank you.

@Ks89
Copy link

Ks89 commented Mar 27, 2017

@JiaLiPassion Hi!
I confirm that commenting these lines everything will be ok:

// Error['stackTraceLimit'] = Infinity;
// require('zone.js/dist/long-stack-trace-zone');

@JiaLiPassion
Copy link
Collaborator

@Ks89 , thank you very much, long-stack-trace will have some performance cost, because it will record all stack traces occurs in every async operation even no error occurs.
we will continue to make long-stack-trace faster.

now you can

  1. for development, you can turn long-stack-trace on, it will help to find the origin of the error.
  2. for performance test, turn it off
  3. for production, it should be off automatically( not included in polyfills).

@Ks89
Copy link

Ks89 commented Mar 27, 2017

@JiaLiPassion
Ok, thank u.

My problem is that it is so slow that I have to disable always long-stack-trace (as you can see from my screenshot, it's requiring about 75 seconds to load my application), because it's impossibile to develop in this situation.

Why with Angular 2 and older versions of zone.js it was working without this issue?

@JiaLiPassion
Copy link
Collaborator

@Ks89,

Why with Angular 2 and older versions of zone.js it was working without this issue?

do you know which version it is ?
and you are using the zone.js 0.8.5 now, is that right?

@Ks89
Copy link

Ks89 commented Mar 27, 2017

Now I'm using Angular 4.0.0 and zone.js 0.8.5 and I have that problem.

With Angular 2.4.10 and zone.js 0.7.2 everything was ok.

With Angular 2.4.10 and zone.js 0.8.5 (I know that I shouldn't use this version with Angular 2.x.x), my application is working, but I have the same problem of Angular 4.

So, I suppose that this problem is caused by zone.js >0.7.2.

@JiaLiPassion
Copy link
Collaborator

@Ks89, thank you , I will do more research on it.

@olaf89
Copy link

olaf89 commented Mar 27, 2017

in my case this problem is appearing when updating 0.7.6 => 8.5. Looks the same application is so slow that im unable to work with it on IE. I can try to upgrade one release at the time tomorrow and figure out on which version this problem happens first. If that would be helpful.

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Mar 28, 2017

@prystoynyy , @Ks89 , @olaf89 , can you test the attached zone.js improve the performance or not (with long-stack-trace-zone.js)

zone.js.zip

@Ks89
Copy link

Ks89 commented Mar 28, 2017

@JiaLiPassion
Still the same problem :(

@prystoynyy
Copy link
Author

prystoynyy commented Mar 28, 2017

@JiaLiPassion, attached zone.js is faster than 0.8.4, but IE still slow

@JiaLiPassion
Copy link
Collaborator

@Ks89 ,thank you for confirming, I'll do more research, in your screenshot, is that possible to see the detail of ZoneAwareError performance data?

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , thank you, is that possible that you can provide a reproduce repository?

@prystoynyy
Copy link
Author

@JiaLiPassion, I can't provide a reproduce repository, because it's copyrighted

@Ks89
Copy link

Ks89 commented Mar 28, 2017

@JiaLiPassion I don't know how. IE is very bad.
Also exporting data with the save button I obtained an useless csv with the same data of the screenshot.

@JiaLiPassion
Copy link
Collaborator

@Ks89, ok, I see, is that possible that you can provide a reproduce repo? I don't know how to reproduce.

@JiaLiPassion
Copy link
Collaborator

hi, guys, could you try the attached long-stack-trace-zone.js?
long.zip

@Ks89
Copy link

Ks89 commented Mar 28, 2017

@JiaLiPassion my code is copyrighted.

I tried with a personal skeleton project on IE 11 with angular 4, zone.js 0.8.5 with long stacktrace and dev mode and this problem it's happening. You are very lucky :)

To run use:

  • npm run build:dev
  • cd dist
  • lite-server

This is the repo: HERE

The situation is not so bad like in my copyrighted project,. But it is also an issue.

@JiaLiPassion
Copy link
Collaborator

@Ks89, thank you, I will try it, can you try my previous post,https://github.com/angular/zone.js/files/875799/long.zip

@Ks89
Copy link

Ks89 commented Mar 28, 2017

@JiaLiPassion still happening also with long-stack-trace-zone.js

@JiaLiPassion
Copy link
Collaborator

@Ks89, sorry, could you try this one?
long.zip

@Ks89
Copy link

Ks89 commented Mar 28, 2017

@JiaLiPassion still the same problem
screenshot-bug

I think that you should try with my skeleton project :)

@JiaLiPassion
Copy link
Collaborator

@Ks89, ok , I will debug with your repo more deeply, thank you for your help.

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Mar 28, 2017

@Ks89, I tried you repo, it is slow, but after I replaced with the modified zone.js and long-stack-trace, it is fast, and the attache is the performance screenshot, ZoneAwareError related stack is gone, could you try the attached dist folder again?

2017-03-29 1 37 57

@prystoynyy, FYI
dist.zip

@prystoynyy
Copy link
Author

@JiaLiPassion, thank you very much, project with attached dist folder works as with 0.7.2
Yes, it is fast

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , thank you for confirm, I will do some other modification to test and try to figure out how to modify this one better.

@JiaLiPassion
Copy link
Collaborator

@prystoynyy , @Ks89, could you try to use the attached dist.zip to test again? I want to find out the exact problem, I tried @Ks89's repo, this version is also ok.
dist.zip

@Ks89
Copy link

Ks89 commented Mar 29, 2017

@JiaLiPassion I confirm that now it's working.

Thank you very much.

@JiaLiPassion
Copy link
Collaborator

@Ks89, thank for your confirmation, I will make a PR to fix this one.

@Ks89
Copy link

Ks89 commented Apr 10, 2017

Hi @JiaLiPassion
Is there an official schedule for this fix?

It's really difficult to develop with this issue. I have to compile with production config also while developing.
Thanks.

@eparini
Copy link

eparini commented Apr 20, 2017

Hi all,
with IE11 is again very slow, I have this configuration:
{
"@angular/animations": "4.0.0",
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/material": "2.0.0-beta.3",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/service-worker": "^1.0.0-beta.8",
"@angular/router": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"core-js": "2.4.1"
"angular2localization": "1.4.2",
"platform": "1.3.4",
"reflect-metadata": "0.1.10",
"rxjs": "5.3.0"
"zone.js": "0.8.5"
}
Will the fix be included in "zone.js": "0.8.6"?
Thanks.

@JiaLiPassion
Copy link
Collaborator

@lelezeus88 , yes, please wait for the 0.8.6 release, it will be released in that version, thanks!

@eparini
Copy link

eparini commented Apr 20, 2017

Do you know, approximately, when will it be released? Thanks.

@JiaLiPassion
Copy link
Collaborator

I am not sure, but I think it will be released soon, because most high priority PR have been merged.

@bharath3719
Copy link

Facing this issue due to ZoneJs. Using the version 0.8.19 . Pls help!

zone

image

@eparini
Copy link

eparini commented Feb 22, 2018 via email

@bharath3719
Copy link

Any leads on how to do the same ? New to angualr please excuse.
I see the following code in zone.js

if (state === REJECTED && value instanceof Error) {
// check if longStackTraceZone is here
var trace = Zone.currentTask && Zone.currentTask.data &&
Zone.currentTask.data[creationTrace];
if (trace) {
// only keep the long stack trace into error when in longStackTraceZone
ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });
}
}

Removing this will disable LongStackTrace ?

@JiaLiPassion
Copy link
Collaborator

@bharath3719 , the screenshot you take doesn't mean zone take a lot of time, because all async callback will be invoked in ZoneDelegate.prototype.invokeTask.

And in prod mode, longStackTrace is disabled by default, if you want to disable longStackTrace in dev mode, just

  • remove import zone.js/dist/long-stack-trace-spec from src/test.ts (older angular/cli project)
  • remove import 'zone.js/dist/zone-testing'; and change it to
import '../zone-spec/proxy';
import '../zone-spec/sync-test';
import '../jasmine/jasmine';
import '../zone-spec/async-test';
import '../zone-spec/fake-async-test';

@bharath3719
Copy link

bharath3719 commented Feb 23, 2018

@JiaLiPassion We were importing
import 'zone.js';
import 'zone.js/dist/zone'; earlier...

I still see very low performance of application on IE after removing those and importing the files uve mentioned.
And you mean to say slowness is due to the code written and not due to zone ?
This is a currently a small application and i don't feel these many Js function calls are necessary.. right ?
My laptop is going non-responsive while running the application and i get a error 'a script has been running for too long' as well. Need to fix this performance issue asap. Any leads on how do i get to the root of the problem?

image

New to this project and to angular as well.. will delete this comment once u respond back :D

@JiaLiPassion
Copy link
Collaborator

@bharath3719 , a script has been running for too long message is far too slow, can you post a reproduce repo? And could you test the application in other browser such as Chrome?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants