Joined October 2014
·
Ciprian Serbu
Bucharest, Romania
·
Posted to
Speeding up AngularJS's $digest loop
over 1 year
ago
Hi, clever approach:) I wonder if it would be possible to "mark" somehow the {{value}} bindings that may be disabled, and remove them from the $$watchers array selectively. Is it possible to add a new "special" directive to angular, like [[value]], for example?
One thing I didn't understand is what do you mean by "hiding" the invisible elements. Wouldn't this affect the scroll area, even disable the scroll bar altogether, if only the visible elements take space in the container?
Thank you!
Right, the padding should do the job (why didn't I think of that:)). How fa-suspendable works is clear to me, I was just wondering if it could be extended to suspend (possibly for good) just some of the watchers in its scope, not all, for example those following a syntax like this: {{value+''}} which shouldn't affect the rendered value, but could help identifying them. However, I can't find a way to get the original expression between the curly braces when looking at the watcher (its fields eq, exp, fn, get, last do not contain this info, and watchStr variable is "private"). And it would get too hacky anyway.
So I think I'll just try to group the suspendable fields in an fa-suspendable element, and keep the others out of it or in a different child scope.