1. #51
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    657
    Vote Rating
    39
    vadimv has a spectacular aura about vadimv has a spectacular aura about

      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
    779
    Vote Rating
    30
    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
    Cluj, Romania
    Posts
    657
    Vote Rating
    39
    vadimv has a spectacular aura about vadimv has a spectacular aura about

      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
    Cluj, Romania
    Posts
    657
    Vote Rating
    39
    vadimv has a spectacular aura about vadimv has a spectacular aura about

      0  

    Default

    c

  5. #55
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    993
    Vote Rating
    119
    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
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  6. #56
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,703
    Vote Rating
    494
    LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future

      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
    993
    Vote Rating
    119
    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?
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  8. #58
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,703
    Vote Rating
    494
    LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future LesJ has a brilliant future

      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
    993
    Vote Rating
    119
    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
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | 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