Does a Firefox Workers limit exist?

后端 未结 4 1895
遇见更好的自我
遇见更好的自我 2020-12-18 04:47

Im trying to create web Workers and post messages to them in cycle:

array.forEach(function (data) {
        this.createWorker();
        this.workers[this.wo         


        
4条回答
  •  臣服心动
    2020-12-18 05:43

    For futher reference check out in Firefox

    about:config

    There's a parameter called :

    dom.workers.maxPerDomain

    Wich (at least in FF 33) is set to a default value of 20.

    gl.

    And as noted on this other stackoverflow question:

    Each browser has web workers limitations (Firefox has 20, Chrome 60+, Opera 16); however, you can change it in Firefox -> dom.workers.maxPerDomain; as for your actual question, if you can or cannot avoid this limitation, I'm not sure. "Workers (as these background scripts are called herein) are relatively heavy-weight, and are not intended to be used in large numbers." Can you give an exact situation where you would want to use more than 20 workers? – Marius Balaban Nov 26 '12 at 22:34

提交回复
热议问题