Hi Sander,

You are right. There are two sides to this. 1) The number of times the
iteration runs. The other is the number of watchers currently in effect.
The important consideration comes in when you have loads of watchers.

The problem is that the function style is much more elegant to read. The
expression style makes the templates look ugly ( and badly designed! ). The
expression style is cheaper (watchers dont fire unless they need to! )
while the function style is slightly costlier ( runs atleast once every
digest cycle ).

On Wed, Sep 17, 2014 at 3:17 PM, Sander Elias <[email protected]> wrote:

> Hi Ganaraj,
>>
>>
> The size of the application has little to do with it. It is the number of
> iterations on that single piece of code that might be affected.
>
> You should know that there will be very little difference. Expressions are
> parsed, not piped trough eval/new Function construction.
> Even if you put in a function in the expression, it will be parsed anyway.
> My guess is that function will often be slower, because of the extra
> look-up. However I think you have to run at least 100.000 iterations to
> get a measurable difference.
> If you need that amount of iterations in your view, you have bigger
> problems ;)
>
> Regards
> Sander
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Ganaraj P R

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to