This technically hinders performance, but not really, depending on how deep you start. Silobox ( http://www.silobox.com/ ) is a JavaScript performance comparison tool, and we wrote a test that tests this. We found that the deeper the object was embedded, the longer the access to these properties.
So, for optimal speed, I recommend adding global quick access functions to your code.
Suppose you have:
var mycompany.myproj.Something = function(){ ... };
Good practice to include
var MCSomething = mycompany.myproj.Something;
Thus, when the JS engine is looking up MCSomething, it does not need to go down the trees. Google Maps takes this approach.
source
share