On Thu, Dec 20, 2012 at 11:23 PM, Daniel Wasilewski <devudes...@gmail.com>wrote:

> http://jsperf.com/global-**namespace-chain-vs-string-**
> based-local-modules/12<http://jsperf.com/global-namespace-chain-vs-string-based-local-modules/12>
>
> This is what worries me the most.


If I understand this test correctly, it measures the overhead of using
require() to hand over references and comes to the conclusion that there is
a considerable overhead.
Note that my prototype uses require() / define() only to set up static
inter-class-dependencies. Once a require() call returns, the result is a
local variable (the parameter) and is accessed directly in the outer
lexical scope of the defined functions -- there can't be any real overhead.
So I understand the performance impact can only negatively influence
application startup or dynamically loading application modules. This is a
point, but what I am more interested in is performance once the application
has started. We use ActionScript to build single-page RIAs, so start-up
time is not so much a concern.

-Frank-

Reply via email to