Results 1 to 2 of 2

Thread: Extjs 6 componentQuery performance

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2015
    Posts
    39
    Answers
    1

    Default Answered: Extjs 6 componentQuery performance

    Hi ,
    We are working on a rich web application in which it is possible to open N tabs where each one contains a FormPanel, which have a large number of fields.

    Actually, i'am looking to get one field from a specified tab, there are two options

    Ext.getCmp('fieldID');
    or
    Ext.getCmp('mainTabPanelID').getActiveTab().query('textfield[id = fieldID]');

    Which method Provides higher performance?

    Thanks.

  2. The short answer is that getCmp will be faster. However, you should probably avoid using it because it will mean the need to assign explicit ids to the items, which will be especially difficult if you have multiple instances of the same form.

    In terms of performance, it will be minimal to the point you won't notice.

  3. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    The short answer is that getCmp will be faster. However, you should probably avoid using it because it will mean the need to assign explicit ids to the items, which will be especially difficult if you have multiple instances of the same form.

    In terms of performance, it will be minimal to the point you won't notice.

Similar Threads

  1. Replies: 4
    Last Post: 3 Aug 2018, 3:35 AM
  2. Extjs ComponentQuery query selector
    By kqpro1 in forum Ext: Q&A
    Replies: 1
    Last Post: 27 Oct 2015, 6:24 AM
  3. Performance consideration: refs vs componentquery
    By jugg1es in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 23 Nov 2012, 4:49 AM
  4. Replies: 1
    Last Post: 21 Jun 2012, 10:36 AM

Tags for this Thread

Posting Permissions

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