Angular Dart too slow and crash on IE9

167 views
Skip to first unread message

Ola Fosheim Grøstad

unread,
Apr 6, 2014, 3:20:09 AM4/6/14
to w...@dartlang.org
Even for a minimal use scenario Angular Dart turns out to be very slow and the generated javascript runs out of stack space on IE9. Is Angular not meant to work on IE9?

Angular is obviously not ready for production use.

I think it would be great if the repository could distinguish between code that is ready for production and code that isn't. Currently I have to assume that all libraries are NOT ready for production which defeats the purpose of having libraries in the first place…

Günter Zöchbauer

unread,
Apr 6, 2014, 6:37:44 AM4/6/14
to w...@dartlang.org
Usually the indication is a version number => 1.0.0

In my experience AngularDart isn't to slow for production but that depends on ones requirements.
Did you use static injection?
My experience so far was, that static injection is notable faster than dynamic injection.

Sometimes complaints about performance are related to not using ng-cloak or similar techniques to avoid FOUC.

Ola Fosheim Grøstad

unread,
Apr 6, 2014, 7:07:36 PM4/6/14
to w...@dartlang.org
Usually the indication is a version number => 1.0.0

That's true… but Angular appears to be pushed a lot so I would expect it to be more mature.
 
In my experience AngularDart isn't to slow for production but that depends on ones requirements.
Did you use static injection?
My experience so far was, that static injection is notable faster than dynamic injection.

No, I download a JSON file and inject it… But the injected HTML (7000+ elements) don't bind to angular code.

Sometimes complaints about performance are related to not using ng-cloak or similar techniques to avoid FOUC.

Well, the stack crashed on IE9… so not sure if that would help.
I think I will just use Angular for admin interfaces and avoid it in public facing code for now.

Günter Zöchbauer

unread,
Apr 7, 2014, 4:54:48 AM4/7/14
to w...@dartlang.org
On Monday, April 7, 2014 1:07:36 AM UTC+2, Ola Fosheim Grøstad wrote:
Usually the indication is a version number => 1.0.0

That's true… but Angular appears to be pushed a lot so I would expect it to be more mature.

I have the impression that is working well for many. <= 1.0.0 is at your own risk.
 
 
In my experience AngularDart isn't to slow for production but that depends on ones requirements.
Did you use static injection?
My experience so far was, that static injection is notable faster than dynamic injection.


With static injection I meant something different.
Angulars dependency injection is able to generate code to not use reflection in production.
Currently a transformer is being created so that no manual setup is necessary for this.
The documentation for the manual setup are already remove from the tutorial.
 
No, I download a JSON file and inject it… But the injected HTML (7000+ elements) don't bind to angular code.


To 'bind' dynamically added HTML you need to 'compile' the added HTML

for HTML generated on the client
see: http://stackoverflow.com/questions/20423565 (my answer shows the code for a custom directive)

for HTML generated on the server
 
Sometimes complaints about performance are related to not using ng-cloak or similar techniques to avoid FOUC.

Well, the stack crashed on IE9… so not sure if that would help.
I think I will just use Angular for admin interfaces and avoid it in public facing code for now.


I heard that there are some issues with older IE. You could file a bug. 

Günter Zöchbauer

unread,
Apr 7, 2014, 4:56:56 AM4/7/14
to w...@dartlang.org
there is also a AngularDart specific discussion group


Ola Fosheim Grøstad

unread,
Apr 7, 2014, 5:13:01 AM4/7/14
to w...@dartlang.org
No, I download a JSON file and inject it… But the injected HTML (7000+ elements) don't bind to angular code.


To 'bind' dynamically added HTML you need to 'compile' the added HTML

It wasn't mean to bind to Angular, but it got very slow with Angular in the build.
Ripped out Angular and everything worked as expected.

So my impression is that Angular only works for very simple low volume scenarios.

Anyway, thanks for sharing :-)

Günter Zöchbauer

unread,
Apr 7, 2014, 6:59:19 AM4/7/14
to w...@dartlang.org
As far as I have seen the AngularDart team already put a lot of effort into optimizing the performance. 

If you can provide more information about what you try to accomplish there is a chance someone knows how to avoid such performance bottlenecks.

Vyacheslav Egorov

unread,
Apr 8, 2014, 7:45:39 AM4/8/14
to w...@dartlang.org
If you are seeing decrease in DOM manipulation speed then it could be caused by Shadow DOM polyfill. 

I have seen numbers like 10x slowdown in Chrome for a DOM manipulation microbenchmark that stresses document.createElement() and I suspect that can be much worse in IE9.

Try including just shadow dom polyfill into your page and see if that reproduces that slowdown.


// Vyacheslav Egorov


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/1964f9d5-5f93-4a6a-92ae-0a692a483502%40dartlang.org.

Reply all
Reply to author
Forward
0 new messages