javascript - component.query versus component.getcomponent in performance -


is component.query() faster component.getcomponent() ?

what pros , cons of using component.query ?

while ext.componentquery queries underlying components (you may define traversing start second param after query string) allow query various set of params, attributes, pseudo classes, functions, etc. full reference , result in set (array) compinstance.getcomponent('itemid') queries direct childs of calling component itemid property , return 1 reference or null. note itemid need unique it's siblings.

so yes getcomponent() bit faster.

i don't think there huge pros , cons. getcomponent() cannot used because may not looking in level. take menu groups the buttons, getcomponent() find group not within it. don't care it.


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -