1. #51
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    Edited: Sorry, i've deleted wrong thoughts, missunderstood.

  2. #52
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    770
    Vote Rating
    28
    Steffen Hiller will become famous soon enough Steffen Hiller will become famous soon enough

      0  

    Default


    vadimv,

    that's basically my point. me = this is actually adding bytes in some cases and I believe it's just an unnecessary overhead for the developer to have to count bytes and decide either way.
    My test checks the ST lib, so what you're saying is that Sencha used it in wrong places?
    Not sure if I understand your comment completely.

  3. #53
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    Quote Originally Posted by Steffen Hiller View Post
    that's basically my point. me = this is actually adding bytes in some cases and I believe it's just an unnecessary overhead for the developer to have to count bytes and decide either way.
    Well I'm used already to this, for me isn't an overhead, just to remember 2 cases: when are more then 3 'this' , and when are more then 4 'this'; depending on how is used with 'var'....
    Last edited by vadimv; 18 Mar 2013 at 2:14 AM. Reason: i've deleted wrong thoughts, missunderstood.

  4. #54
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    c

  5. #55
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    The @mschwartz's and @yyjia's findings that using "var me = this;" leads to a performance boost are very interesting.

    The @mschwartz's test produces the following results for me (+/- a few milliseconds) with Windows 7:

    FireFox - 92 vs 74
    Chrome - 30 vs 21
    IE9 - 100 vs 87

    The performance boost in Chrome is about 30%. I think it is very substantial.

    I agree with @yyjia, it would be interesting, if some guru in JavaScript engines can give some more or less professional comment on this aspect.

    Well, the performance is always actual. For Ext JS as well
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  6. #56
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,351
    Vote Rating
    136
    LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all

      0  

    Default


    Daniil, there's no performance again. I provided a link to an http://stackoverflow.com/ post which in turn linked to a jsPerf test showing that there's no performance gain.

    Quote Originally Posted by Daniil View Post
    The @mschwartz's and @yyjia's findings that using "var me = this;" leads to a performance boost are very interesting.

    The @mschwartz's test produces the following results for me (+/- a few milliseconds) with Windows 7:

    FireFox - 92 vs 74
    Chrome - 30 vs 21
    IE9 - 100 vs 87

    The performance boost in Chrome is about 30%. I think it is very substantial.

    I agree with @yyjia, it would be interesting, if some guru in JavaScript engines can give some more or less professional comment on this aspect.

    Well, the performance is always actual. For Ext JS as well

  7. #57
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Quote Originally Posted by LesJ View Post
    Daniil, there's no performance again. I provided a link to an http://stackoverflow.com/ post which in turn linked to a jsPerf test showing that there's no performance gain.
    Thank you for the answer, @LesJ.

    Is this link you are talking about?
    http://stackoverflow.com/questions/8...-versus-minify

    Could you, please, point me to a link to the jsPerf test?
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  8. #58
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,351
    Vote Rating
    136
    LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all

      1  

    Default


    Here you go:

    http://stackoverflow.com/questions/7...of-var-me-this

    http://jsperf.com/self-vs-this

    Quote Originally Posted by Daniil View Post
    Thank you for the answer, @LesJ.

    Is this link you are talking about?
    http://stackoverflow.com/questions/8...-versus-minify

    Could you, please, point me to a link to the jsPerf test?

  9. #59
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    111
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Thank you. I see the substantial difference appears with Chrome only. Probably, some trait of its JavaScript engine.

    Who knows, maybe, Chrome will be a single browser in the future
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

Similar Threads

  1. Replies: 5
    Last Post: 2 Jan 2014, 9:08 AM
  2. Replies: 4
    Last Post: 31 Mar 2011, 9:04 AM
  3. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  4. replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
    By ealpha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 May 2008, 8:28 PM

Thread Participants: 14