[webkit-dev] support for navigator.cores or navigator.hardwareConcurrency
shaeffer at neuralscape.com
Mon May 5 19:10:56 PDT 2014
On Mon, May 05, 2014 at 06:23:54PM -0700, Oliver Hunt wrote:
> On May 5, 2014, at 6:13 PM, Rik Cabanier <cabanier at gmail.com> wrote:
> > Do you really want a page to know that you have a fancy-pants 24-core Mac Pro rather than a little Mac mini?
> > Yes!
> > If I have 24 cores ready to do work and the page can put them to use, I would like it to do so.
> > At the same time, if I just have a old mac mini, I don't want the page to launch 24 workers as that will exhaust my memory and cause contention.
> But I don't have 24 cores available, i have 24 cores installed. You have no idea what the actual workload of the system is, you don't know whether any other tabs are also using workers, you only have one piece of information, and that is nowhere near sufficient to make a reasonable choice.
> A better solution would be to have a WorkerSet API where the browser is able to make a sensible choice given the current system, system load, power source, etc, etc
Well, extending your concept, there could be a configuarable resources available WorkSet
that could also depend on a trustworthy factor of who's page is in my browser. Such a
configurable system could also account for the fact I might want to reserve some level
of my available resources for higher priorities, even if, at the moment, those resources
are available. Such an implementation also adds some level of uncertainty to any
> Generating workloads on the basis of # of installed cores has be attempted on every environment and it almost always leads to incorrect choices being made.
> > On May 5, 2014, at 4:58 PM, Filip Pizlo <fpizlo at apple.com> wrote:
> >> I like this. Personally, I don't see any downside.
> >> Is there a bug (on bugs.webkit.org), and if not, can you create one? :-)
> >> -Phil
> >> On May 5, 2014 at 4:49:35 PM, Rik Cabanier (cabanier at gmail.com) wrote:
> >>> All,
> >>> there's a thread on blink-dev  and whatwg  to create a new parameter on the navigator object that returns the maximum number of tasks that can run in parallel. 
> >>> Is this something that WebKit would support?
> >>> 1: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/B6pQClqfCp4
> >>> 2: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-May/254200.html
> >>> 3: http://wiki.whatwg.org/wiki/NavigatorCores
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > https://lists.webkit.org/mailman/listinfo/webkit-dev
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
--- end quoted text ---
Karen Shaeffer Be aware: If you see an obstacle in your path,
Neuralscape Services that obstacle is your path. Zen proverb
More information about the webkit-dev