Matt,

> > Matt Foster wrote:
> > You could improve performance a little bit by skipping the each and
> > using invoke.
[...]
> kangax wrote:
> `invoke` is actually slower than `each`.

And yes, the current documentation *IS* misleading in this regard.
Surprisingly I couldn't find a ticket for that, so I've created one:
http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/359
--
T.J. Crowder
tj / crowder software / com

On Sep 24, 8:33 pm, kangax <[EMAIL PROTECTED]> wrote:
> On Sep 24, 2:33 pm, Matt Foster <[EMAIL PROTECTED]> wrote:
>
> > You could improve performance a little bit by skipping the each and
> > using invoke. You'd have to modify some of the stuff, such as your
> > declaration of section_id but it wouldn't be too difficult to convert.
>
> > $$("a.more").invoke("observe", "click", function);
>
> >http://prototypejs.org/api/enumerable/invoke
>
> Matt,
> `invoke` is actually slower than `each`.
> `_each` on the other hand is a little faster than `each` (since it
> avoids a try/catch wrapping)
>
> --
> kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to