mandag 30. mai 2011 kl. 13:37:01 UTC+2 skrev zedshaws_eviltwin følgende:
>
> > 
> > > The following I believe conforms to the goal as stated on 
> > > jsmentors.com: "Review your article on JavaScript topic" 
> > 
> > To be honest - I don't see how the 'everything is a string' issue relates 
> to 
> > the how Ext4 uses the 'class' name to specify inheritance. This is a 
> common 
> > pattern shared among many libraries. 
>
> And what if all those libraries' implementations are needlessly slow? 
> Did you see the (admittedly crude) benchmark at the bottom of the post 
> on the ExtJS forum?  Using the string instead of the object/"class" 
> reference definitely seems slower.  So what are the ostensible 
> benefits of using a string instead, and can the performance be improved


I did see them, and the benchmark has little value. The benchmark is for 
creating objects, and extending classes is not an operation you would run 10 
000 times in an app, maybe you would do it 5 or 10 times.

When creating new instances you are free to use the constructor instead of 
`Ext.create` and probably should, but I doubt that you in most application 
would notice any difference.

Sean

 

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to