We have a lot of objects in our code base that are name spaced to avoid collision.
Example : App.local.view.MyView...
In most of the places i have seen in the code base we use the full path to get a reference to the object and this is repeated multiple times within the same function.
Example :
function hello() {
App.local.view.MyView.render();
...
...
App.local.view.MyView.reset();
}
I wanted to understand if storing a reference to the object as below
var MyView = App.local.view.MyView;
would have any improvement in the performance. What makes me ask this question is form my understanding modern browsers like chrome do some optimization automatically for us behind the scenes.