0

We have a simple JSF + PrimeFaces 6.1 project which is for now a POC to solve a problem that we have in our actual project, which is basically the need to load JSF/PF components concurrently. I was able to implement it adapting the solution from this answer here from Stackoverflow: JSF lazy loading component value

But the "problem"/question now is: why are the async remoteCommand calls invoked in groups of 6 and the following 6 are queued and so on? Is it a browser thing, jQuery configuration/limitation or an actual p:remoteCommand limitation? I wasn't able to find a property to set unlimited or 10 or 12 for instance.

Obs: I have tried both with and without the autoRun and invoked them by their names, but the result was the same. 6 by 6.

Chrome Network Timeline below: enter image description here

Code fragment below:

<p:remoteCommand async="true" id="rcLoadWidget" 
   actionListener="#{dashboardController.loadWidget}"
   process="panelGroup" autoRun="true"
   partialSubmit="true" update="panelWidget @form:btSave" />

Could you please advise? :)

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
paulo.bing
  • 82
  • 10
  • 1
    PrimeFaces 6.1 does not include jquery 3.2.1 so try removing that first (assuming you added that manually). And regarding "Is it a browser thing," google is your friend... https://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser. And you can already see the browser knows about them (the grey line) so it is not a queue in jquery, nor Primefaces. Easy deduction – Kukeltje Jan 09 '18 at 13:32
  • @Kukeltje thanks for the good observation! I was in fact including jQuery because I'd started with a plain html and forgot to remove it. But most importantly, the "max parallel http connections in a browser" really answered my question. I will look for different approaches to load more content (components) concurrently, if you know of any please let me know. Thanks! – paulo.bing Jan 09 '18 at 17:21

0 Answers0