It would. Although again I disagree with your conclusion as to why.  
(But it does reinforce my previous assertion that most of the  
slowdown you were seeing was due to element creation.)

The prototype DOM builder uses a technique unique to IE to create the  
elements (in IE only), which (being similar to the innerHTML solution  
which has been proven to be decently fast in IE), is much faster than  
document.createElement.

I don't buy the "slowness caused by extending" argument, because a)  
it didn't go away in your new test, and yet you saw speedup, and b)  
Prototype's DOM builder (i.e. new Element) extends elements too.

Oh, ... and there are too many Tom's on this thread.  Some of you  
will have to change your name.  =)


TAG

On Aug 9, 2007, at 1:05 AM, Tom wrote:

> I believe the slowness is caused by the speed (or lack thereof) of
> extending each element during the call to Event.observe (element=$
> (element)) in IE. Using the new DOM Builder functionality in the trunk
> branch (http://www.prototypejs.org/2007/5/12/dom-builder) and
> replacing
>
>       var el=document.createElement("div");
>                  el.className = "dot";
>
> with
>
>         var el = new Element('div',{className : "dot"});   //Uses the
> DOM Builder functionality to create the element already extended
>
> brings the speeds of the browsers much closer together
>
> Tom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to