launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #00975
Re: YUI().use(...) blocks can be costly?
Hi Gavin,
On Wed, Sep 16, 2009 at 1:44 PM, Gavin Panella
<gavin.panella@xxxxxxxxxxxxx> wrote:
<snip>
> Thankfully the fix is reasonably obvious: change the bug index page to
> use fewer .use(...) blocks. This will also make the page cleaner and
> shorter too, so it's not a nasty workaround.
One thing that I've mentioned on IRC and didn't get carried over is
that it is possible to save the result of the first YUI().use() into a
variable and reuse that across multiple function calls. Eg:
Y = YUI().use(...);
some_function(Y);
another_function(Y);
-- Sidnei
Follow ups
References