When reading information about PrimeFaces selector the following information can be found primefaces blog
There is less CPU server load compared to regular referencing because JSF component tree is not traversed on server side to find a component and figure out the client id as PFS is implemented on client side by looking at dom tree
I've tried to create really simple project like this :
<h:form>
<p:panel id="panel2" header="Second panel">
<p:outputLabel for="address" value="Address"/>
<p:inputText id="address" required="true"/>
</p:panel>
<p:commandButton process="@(.ui-panel)" update="@(.ui-panel)"
value="Process and update all panels"/>
</h:form>
Then I debug on UIComponentBase findComponent() method. Suprisingly no matter which kind of selector I use (@(.ui-panel) or just panel2) it hits the method the same amount of times. In quoted text stands that it is better because component tree is not traversed on server side. But it looks like it is traversed no matter of usage primefaces selector. What is wrong in my way o thinking ? How PrimeFaces selector are better then standard ones ?