yaru22/angular-timeago

Don't run the timeout each second

dirkgroenen opened this issue · 1 comments

At the moment the filter uses an interval of 1 second to check if the value has to be changed. Since each call to $timeout will make the digest cycle run it's quite a waste of performance. I know we're talking about a little bit of performance over here, but every save is a win.

Instead of running it each second it would make more sense to check the possibility of a future update and set the timeout delay based on that.

Thanks to @jharting, you can set timeAgo.settings.refreshMillis to tweak that behavior now. Please see #62.