← Back to team overview

launchpad-dev team mailing list archive

Re: js timeout issues on ec2 due to deep js namespaces

 

On Wed, 19 Sep 2012, Gavin Panella wrote:

> On 18 September 2012 18:51, Richard Harding <rick.harding@xxxxxxxxxxxxx> wrote:
> ...
> > var ns = Y.lp.registry.product.view;
>
> Why is doing this not enough? It seems that getting rid of nested
> namespaces is a fairly big piece of work in order to avoid best
> practice as above, i.e. simulating `from module import thing`.

This comes down to debugging and the time it takes to debug. There's
something fishy. This would all pass locally without any issues. It only
failed in ec2. The code and test were really pretty small and there were
less than a dozen namespace lookups. It's possible that narrow those down
via the 'var ns' would have allowed the tests to pass, but with the long test
times to verify how much change was required to pass, I'm not certain yet.

Personally, I think there's some weakness in the JS test runner, but more
work is required to figure it out.

Since this was only the issue with the new bit of code and I did go
namespace happy, I wanted to just bring it up that if you hit these js
timeout errors on ec2 for seemingly no reason this could be something to
look at.

--

Rick Harding

Launchpad Developer
https://launchpad.net/~rharding
@mitechie


Follow ups

References