Results 1 to 3 of 3

Thread: Ext.ComponentQuery cache disabled?

  1. #1
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    786
    Vote Rating
    36
      0  

    Default Ext.ComponentQuery cache disabled?

    Anybody know why in 2.1 Beta 3 (not sure since which version) the Ext.ComponentQuery cache is disabled? At least it seems so, since the following lines are commented in the query method:

    Code:
    //                query = this.cache[selector];
    //                if (!query) {
    //                    this.cache[selector] = query = this.parse(selector);
    //                }
    I was just checking to see if there is any performance gain by using refs in the controller.
    If one component is referenced more than once, it seems so, but if the Ext.ComponentQuery cache would work, there wouldn't be any benefit performance wise using refs in controllers, am I right?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    Better perf would be to start from a root to resolve a component instead of using Ext.ComponentQuery.query as it starts from the beginning and will go through all levels to find matches.

    This change was done way back in January also. Comment was only "Remove infinite cache in ComponentQuery."
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    786
    Vote Rating
    36
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Better perf would be to start from a root to resolve a component instead of using Ext.ComponentQuery.query as it starts from the beginning and will go through all levels to find matches.

    This change was done way back in January also. Comment was only "Remove infinite cache in ComponentQuery."
    Hmm 'infinite cache' sounds like it had a memory leak then.
    Yeah, I know that of the root, but refs don't use a root either.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •