I was wondering whether there is any associated performance problems with using only one namespace or whether assigning more than one is better ?
By this I mean
(function (myApp, $, undefined) {
} (window.myApp = window.myApp || {}, jQuery));
And assign every function / object / property to the myApp namespace or whether it is more efficent from a performance perspective to have myApp for common functions etc and then have
(function (myAppSettings, $, undefined) {
} (window.myAppSettings = window.myAppSettings || {}, jQuery));
And so forth ?
Edit: to clarify the generic settings to myAppSettings per @pimvdb very correct comment
Generally a shallow tree is better than a deep tree (citation from here). So, depending on the circumstances, it may be better to use more than one namespace. The cited article claims a single namespace is negligible in terms of perfomance though.