[mochikit] Re: MochiKit.DOM.getElementsByTagAndClassName performance

2009-11-05 Thread Alex Russell


On Nov 5, 2009, at 1:32 AM, Fredrik wrote:


 I created a getElementsByClassName based on this code:
 http://robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/
 http://code.google.com/p/getelementsbyclassname/

 Pending a full selector integration something like this should be an
 easy drop-in
 solution to optimize getElementsByTagAndClassName.
 (IE really needs some speedup here..)

 // Fredrik Blomqvist

 On Nov 5, 7:45 am, Amit Mendapara mendapara.a...@gmail.com wrote:
 Look at my mochikit-ext project athttps://launchpad.net/mochikit-ext.
 I have implemented a jQuery style API in MochiKit.Query module  
 (http://
 bazaar.launchpad.net/~amit-mendapara/mochikit-ext/trunk/files) which
 is based on Sizzle.js (http://github.com/jeresig/sizzle).

 MochiKit.DOM.getElementsByTagAndClassName(div, some-class)

 can be replaced with

 MochiKit.Query(div.some-class).get()

 The Sizzle.js is the fastest selector engine out there. 
 Seehttp://www.hvergi.net/arnar/public/sizzle/speed/#for 
  the speed tests.

Actually, it's not. The Acme engine in Dojo beats it by a fair bit on  
most real-world selectors. It's stand-alone and can be easily imported  
(like Sizzle).

Regards

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to 
mochikit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Google Closure includes MochiKit

2009-11-05 Thread Fredrik

Hi,

Google recently announced their core javascript library - Closure.
http://code.google.com/closure/library/

When browsing the code I noticed it uses parts of MochiKit:
http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/dom/dom.js
http://code.google.com/p/closure-library/source/browse/#svn/trunk/third_party/closure/goog/mochikit/async
There's also very similar bind, partial, array utils, an iter module
etc.

Overall the style is similar, i.e functional, Python.
Apparently they've got good taste in Mountain View :)

Regards
// Fredrik Blomqvist
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to 
mochikit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---