mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-09 22:39:39 +08:00
In apps that create lots of scopes (apps with large tables) the uid generation shows up in the profiler and adds a few milliseconds. Using simple counter doesn't have this overhead. I think the initial fear of overflowing and thus using string alphanum sequence is unjustified because even if an app was to create lots of scopes non-stop, you could create about 28.6 million scopes per seconds for 10 years before you would reach a number that can't be accurately represented in JS BREAKING CHANGE: Scope#$id is now of time number rather than string. Since the id is primarily being used for debugging purposes this change should not affect anyone.