ng-show slow performance since angular version 1.2.17

883 views
Skip to first unread message

Christian Thomas

unread,
Jul 19, 2014, 7:14:47 PM7/19/14
to ang...@googlegroups.com
Hi,


first I'm sorry, that I can't create a live example including the issue at the moment. 

I'm developing a larger project with angular / scala's liftweb / JEE backend services ... 

For instance I have a button group, where for some buttons a ng-show is defined. When I will load the page, I will see first all buttons before the ng-show is performing to hide the buttons, that must not be shown to that time.

Another example is, that I have a button SELECT and a button UNSELECT. First only the SELECT button is requested. If that button is pressed, it has to be hidden and the UNSELECT has to be shown. It is resolved using the ng-show for both buttons. But also here for 500ms - 1s I will see both buttons, before hiding the button will work.

If I will build a tiny example, everything works fine with the latest version. So actually I do not have any idea to detect the problem / poor performance or to create an example for you. 

But I can say, that everything has worked great with the angular 1.2.16 version - and earlier versions. Since the 1.2.17 - 1.2.20 the poor performance is a big problem.

We are using a lot of directives / angular services and so on. Possibly the amount of directives / services is a problem ? ( --> needs a better way to initiate or so ? )


Does anybody have an idea?


Cheers!
Christian


PS: In the changelog for the 1.2.17 I have found:

Bug Fixes

  • $animate:
    • remove the need to add display:block!important for ngShow/ngHide (55b2f0e8#3813)
    • retain inline styles for property-specific transitions (ad08638c#7503)
    • ensure class-based animations always perform a DOM operation if skipped (34d07403#6957)
....

Performance Improvements

  • $interpolate: optimize value stringification (9d4fa33e#7501)
  • scope: 10x. Share the child scope class. (9ab9bf6b)

Martin Alix

unread,
Jul 20, 2014, 8:28:29 AM7/20/14
to ang...@googlegroups.com
Have you tried ng-cloak? It's made for that...

https://docs.angularjs.org/api/ng/directive/ngCloak

Christian Thomas

unread,
Jul 21, 2014, 4:25:15 PM7/21/14
to ang...@googlegroups.com
Hey Martin,

thanks for your response : )

We are already using ng-cloak to prevent, that something like {{ ng-stuff }} is shown for a few milliseconds. We have actually found out, that if we deactivate the ng-animate module, that everything works fine. That is no solution for us, while we want to use the ng-animate framework in combination with ng-repeat and so on, but a hint - Reasons are unknown..

Cheers!

Christian Thomas

unread,
Jul 21, 2014, 4:38:42 PM7/21/14
to ang...@googlegroups.com
I have tested to go back to version 1.2.16 and everything works fine (including ng-animate). If I will use a newer version for the main angular.js file, then it will be inperformant (when ng-animate will be used). Something must be changed at angular side, but I actually don't know, what it is...

Christian Thomas

unread,
Jul 22, 2014, 2:18:31 AM7/22/14
to ang...@googlegroups.com
I have created an issue @ github

https://github.com/angular/angular.js/issues/8288

There you will find a live plunkr example, that shows the problem.

Thanks

Reply all
Reply to author
Forward
0 new messages