Closed gryphonmyers closed 6 years ago
Humm I have to say this is a bit complicated to grasp here...
Heh basically the change is to prevent the template function from having to eval() too much because that can get to be an expensive operation on a very large locals object.
@batiste Can I get a version bump?
Previously, we were iterating over the entire locals object and evaluating each key. Performance testing indicated that this could get to be a significant bottleneck in larger apps with many keys in locals object.
With this commit, we instead attempt to temporarily add a getter to global scope. If there is a name conflict, we fall back to the eval method, but in most cases this will significantly improve performance.