Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Rik Cabanier
On Wed, Jul 2, 2014 at 2:19 AM, Ryosuke Niwa rn...@apple.com wrote: On May 3, 2014, at 10:49 AM, Adam Barth w...@adambarth.com wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Anne van Kesteren
On Wed, Jul 2, 2014 at 8:58 AM, Rik Cabanier caban...@gmail.com wrote: Since there are now 2 implementations, it should be added to the spec instead of just being a wiki. That depends on whether other vendors are objecting. Looks like that is the case:

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Rik Cabanier
On Wed, Jul 2, 2014 at 10:37 AM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, Jul 2, 2014 at 8:58 AM, Rik Cabanier caban...@gmail.com wrote: Since there are now 2 implementations, it should be added to the spec instead of just being a wiki. That depends on whether other vendors are

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Anne van Kesteren
On Wed, Jul 2, 2014 at 3:31 PM, Rik Cabanier caban...@gmail.com wrote: That thread concluded with a let's see how this feature is going to be used before we commit. I cannot find that quote. -- http://annevankesteren.nl/

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Ryosuke Niwa
On Jul 2, 2014, at 6:31 AM, Rik Cabanier caban...@gmail.com wrote: On Wed, Jul 2, 2014 at 10:37 AM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, Jul 2, 2014 at 8:58 AM, Rik Cabanier caban...@gmail.com wrote: Since there are now 2 implementations, it should be added to the spec

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Glenn Maynard
On Wed, Jul 2, 2014 at 11:31 AM, Rik Cabanier caban...@gmail.com wrote: I thought that those concerns were addressed with the addition of a maximum number of cores? That doesn't address much, if anything. Also, WebKit's implementation also caps the number of cores at eight to mitigate

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Joshua Cranmer
On 7/2/2014 8:31 AM, Rik Cabanier wrote: That thread concluded with a let's see how this feature is going to be used before we commit. Blink and WebKit certainly are in favor. I went back and looked at the later messages in that thread. Your argument implies that a plurality of engines

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Boris Zbarsky
On 7/2/14, 3:21 PM, Rik Cabanier wrote: facts = 2 implementations. I certainly didn't say anything else. You said, and I quote: That thread concluded with a let's see how this feature is going to be used before we commit. Anyway, 2 implementations is a necessary condition for a REC, not

Re: [whatwg] Proposal: navigator.cores

2014-07-02 Thread Rik Cabanier
On Wed, Jul 2, 2014 at 9:27 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 7/2/14, 3:21 PM, Rik Cabanier wrote: facts = 2 implementations. I certainly didn't say anything else. You said, and I quote: That thread concluded with a let's see how this feature is going to be used before we

Re: [whatwg] Proposal: navigator.cores

2014-07-01 Thread Nils Dagsson Moskopp
Eli Grey m...@eligrey.com writes: We want to claim 6 in that situation. If the API claimed less than 6 on Samsung's Exynos 5 Hexa (2x A15 cores + 4x A7 cores), then the cores will be underutilized. Implying it is right for any application to utilize all cores available in a multi-process

Re: [whatwg] Proposal: navigator.cores

2014-07-01 Thread Ryosuke Niwa
On May 3, 2014, at 10:49 AM, Adam Barth w...@adambarth.com wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this functionality exists in every other platform (including iOS and Android). Some of the

Re: [whatwg] Proposal: navigator.cores

2014-05-13 Thread James Graham
On Fri, May 9, 2014 at 9:56 AM, David Young dyo...@pobox.com wrote: The algorithms don't have to run as fast as possible, they only have to run fast enough that the system is responsive to the user. If there is a motion graphic, you need to run the algorithm fast enough that the motion

Re: [whatwg] Proposal: navigator.cores

2014-05-13 Thread Boris Zbarsky
On 5/13/14, 10:11 AM, James Graham wrote: I think the problem that I have with this API is the number of cores that exist isn't obviously a good proxy for the number of cores that are available. It I have N cores and am already using M cores for e.g. decompressing video, N-M is probably a much

Re: [whatwg] Proposal: navigator.cores

2014-05-13 Thread Eli Grey
On Tue, May 13, 2014 at 1:15 PM, Boris Zbarsky bzbar...@mit.edu wrote: this proposal seems to assume that the UA itself is using a very few cores The proposal does not assume anything regarding current system load. If the UA is using every core for some CPU-intensive operation, then

Re: [whatwg] Proposal: navigator.cores

2014-05-13 Thread David Young
On Fri, May 09, 2014 at 11:05:03AM -0500, Glenn Maynard wrote: On Fri, May 9, 2014 at 9:56 AM, David Young dyo...@pobox.com wrote: The algorithms don't have to run as fast as possible, they only have to run fast enough that the system is responsive to the user. If there is a motion

Re: [whatwg] Proposal: navigator.cores

2014-05-09 Thread David Young
On Mon, May 05, 2014 at 07:31:15PM -0400, Eli Grey wrote: I have a list of example use cases at http://wiki.whatwg.org/wiki/NavigatorCores#Example_use_cases Each of these use cases involves a parallelizable algorithm that needs to run as fast as possible on the user's system in order for the

Re: [whatwg] Proposal: navigator.cores

2014-05-09 Thread Glenn Maynard
On Thu, May 8, 2014 at 10:13 PM, Adam Barth w...@adambarth.com wrote: I've updated the spec proposal [1] to sanction reporting fewer than the actual number of logical cores as a fingerprinting mitigation. The spec should allow the UA to do this (the real value isn't script-visible, so it

Re: [whatwg] Proposal: navigator.cores

2014-05-08 Thread Rik Cabanier
FYI From the WebKit side, people are leaning towards returning the logical CPU count but limit the maximum value to 8 [1]. This should cover the vast majority of systems and use cases for this property and still not expose users that are on high value devices.. 1:

Re: [whatwg] Proposal: navigator.cores

2014-05-08 Thread Joe Gregorio
Maybe we can also return their RAM, but limit it to a maximum of 640K, since no one will need more than that :-) I think in a few years the limit to 8 cores will look just as silly. On Thu, May 8, 2014 at 10:02 PM, Rik Cabanier caban...@gmail.com wrote: FYI From the WebKit side, people are

Re: [whatwg] Proposal: navigator.cores

2014-05-08 Thread Rik Cabanier
On Thu, May 8, 2014 at 7:07 PM, Joe Gregorio jcgrego...@google.com wrote: Maybe we can also return their RAM, but limit it to a maximum of 640K, since no one will need more than that :-) I think in a few years the limit to 8 cores will look just as silly. Once 16 is common, WebKit will be

Re: [whatwg] Proposal: navigator.cores

2014-05-08 Thread Glenn Maynard
On Tue, May 6, 2014 at 9:33 PM, Rik Cabanier caban...@gmail.com wrote: What do you mean? The paper explains that fingerprinting is a problem for privacy, and here it's being used to argue fingerprinting is already so bad that we should stop trying. (I'm not saying he can't do it or that it's

Re: [whatwg] Proposal: navigator.cores

2014-05-08 Thread Adam Barth
I've updated the spec proposal [1] to sanction reporting fewer than the actual number of logical cores as a fingerprinting mitigation. I've also renamed the API from navigator.cores to navigator.hardwareConcurrency to match the proposed WebKit patch. Adam [1]

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread João Eiras
On Tue, 06 May 2014 01:29:47 +0200, Kenneth Russell k...@google.com wrote: Applications need this API in order to determine how many Web Workers to instantiate in order to parallelize their work. On Tue, 06 May 2014 01:31:15 +0200, Eli Grey m...@eligrey.com wrote: I have a list of example

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread David Young
On Mon, May 05, 2014 at 01:05:35PM -0700, Rik Cabanier wrote: On Mon, May 5, 2014 at 11:10 AM, David Young dyo...@pobox.com wrote: On Sat, May 03, 2014 at 10:49:00AM -0700, Adam Barth wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread Joe Gregorio
On Tue, May 6, 2014 at 7:57 AM, João Eiras jo...@opera.com wrote: ... I guess everyone that is reading this thread understands the use cases well and agrees with them. The disagreement is what kind of API you need. Many people, rightly so, have stated that a core count gives little

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread Rik Cabanier
On Tue, May 6, 2014 at 8:51 AM, Joe Gregorio jcgrego...@google.com wrote: On Tue, May 6, 2014 at 7:57 AM, João Eiras jo...@opera.com wrote: ... I guess everyone that is reading this thread understands the use cases well and agrees with them. The disagreement is what kind of API you

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread Boris Zbarsky
On 5/6/14, 5:30 PM, Rik Cabanier wrote: Leaving the question of fingerprinting aside for now, what name would people prefer? mauve? Failing that, maxUsefulWorkers? -Boris

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread Glenn Maynard
On Sun, May 4, 2014 at 4:49 PM, Adam Barth w...@adambarth.com wrote: You're right that Panopticlick doesn't bother to spend the few seconds it takes to estimate the number of cores because it already has sufficient information to fingerprint 99.1% of visitors:

Re: [whatwg] Proposal: navigator.cores

2014-05-06 Thread Rik Cabanier
On Tue, May 6, 2014 at 5:24 PM, Glenn Maynard gl...@zewt.org wrote: On Sun, May 4, 2014 at 4:49 PM, Adam Barth w...@adambarth.com wrote: You're right that Panopticlick doesn't bother to spend the few seconds it takes to estimate the number of cores because it already has sufficient

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Boris Zbarsky
On 5/4/14, 9:49 AM, Adam Barth wrote: Maybe navigator.hardwareConcurrency as a nod to the C++11 name? What is the proposed behavior of this attribute on AMP (as opposed to SMP) systems? Note that some of these are shipping in actual devices today, and I expect that to continue. -Boris

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Adam Barth
On Sun, May 4, 2014 at 8:35 PM, Ian Hickson i...@hixie.ch wrote: On Sun, 4 May 2014, Adam Barth wrote: The world of computing has changed since 2009. At that time, the iPhone 3G had just been released and Apple hadn't even released the first iPad. The needs of the web as a platform

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Boris Zbarsky
On 5/5/14, 11:26 AM, Adam Barth wrote: On getting, the cores property should return the number of logical processors available to the user agent. For example on OS X this should be equivalent to running sysctl -n hw.ncpu. This doesn't really answer my question. What if there are six logical

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Eli Grey
We want to claim 6 in that situation. If the API claimed less than 6 on Samsung's Exynos 5 Hexa (2x A15 cores + 4x A7 cores), then the cores will be underutilized. We already experience varying performance per core with current systems (especially mobile SoCs) using uniform core hardware, simply

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Rik Cabanier
On Mon, May 5, 2014 at 11:10 AM, David Young dyo...@pobox.com wrote: On Sat, May 03, 2014 at 10:49:00AM -0700, Adam Barth wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this functionality

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread João Carlos Martins Eiras
Hi. I'm just taking a peek at this topic. My first impression is: why would anyone want such a low level hardware information (CPU cores and whatnot) on something as high level and abstract as a browser? This strikes me initially a useful as having the CPU architecture exposed as well. However,

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Eli Grey
I have a list of example use cases at http://wiki.whatwg.org/wiki/NavigatorCores#Example_use_cases Each of these use cases involves a parallelizable algorithm that needs to run as fast as possible on the user's system in order for the user to have a responsive experience. You can never run any of

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Ian Hickson
On Mon, 5 May 2014, Kenneth Russell wrote: It would be great to design a new parallelism architecture for the web, but from a practical standpoint, no progress has been made in this area for a number of years, and web developers are hampered today by the absence of this information.

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Eli Grey
GCD exposes core count in that you can make your jobs keep track of the current time and then count how many threads are running at the same time. A GCD-style API will enable me to replace all of Core Estimator's estimation and statistical code with a very simple counter and time tracker, while

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread David Dailey
On Mon, 5 May 2014, Kenneth Russell wrote: It would be great to design a new parallelism architecture for the web, but from a practical standpoint, no progress has been made in this area for a number of years, and web developers are hampered today by the absence of this information. On

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Boris Zbarsky
On 5/5/14, 7:29 PM, Kenneth Russell wrote: There's no provision in the web worker specification for allocation of a web worker to fail gracefully, or for a worker to be suspended indefinitely. This is not actually true. Nothing in the spec requires a UA to expose the full parallelism of the

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Rik Cabanier
On Mon, May 5, 2014 at 7:35 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 5/5/14, 7:29 PM, Kenneth Russell wrote: There's no provision in the web worker specification for allocation of a web worker to fail gracefully, or for a worker to be suspended indefinitely. This is not actually true.

Re: [whatwg] Proposal: navigator.cores

2014-05-05 Thread Ian Hickson
On Mon, 5 May 2014, Eli Grey wrote: GCD exposes core count in that you can make your jobs keep track of the current time and then count how many threads are running at the same time. A GCD-style API will enable me to replace all of Core Estimator's estimation and statistical code with a

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Tobie Langel
On May 4, 2014, at 7:45, Rik Cabanier caban...@gmail.com wrote: On Sat, May 3, 2014 at 10:32 PM, Eli Grey m...@eligrey.com wrote: The proposal specifically states using logical cores, which handles all of the CPUs you mentioned properly. Intel CPUs with hyperthreading enabled report logical

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Adam Barth
On Sun, May 4, 2014 at 12:13 AM, Tobie Langel tobie.lan...@gmail.comwrote: On May 4, 2014, at 7:45, Rik Cabanier caban...@gmail.com wrote: On Sat, May 3, 2014 at 10:32 PM, Eli Grey m...@eligrey.com wrote: The proposal specifically states using logical cores, which handles all of the CPUs

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Ian Hickson
On Sat, 3 May 2014, Adam Barth wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. [1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/B6pQClqfCp4 [2] http://wiki.whatwg.org/wiki/NavigatorCores Some of

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Adam Barth
On Sun, May 4, 2014 at 1:11 PM, Ian Hickson i...@hixie.ch wrote: On Sat, 3 May 2014, Adam Barth wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. [1]

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Rik Cabanier
On Sun, May 4, 2014 at 1:11 PM, Ian Hickson i...@hixie.ch wrote: On Sat, 3 May 2014, Adam Barth wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. [1]

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Rik Cabanier
On Sun, May 4, 2014 at 6:49 AM, Adam Barth w...@adambarth.com wrote: On Sun, May 4, 2014 at 12:13 AM, Tobie Langel tobie.lan...@gmail.comwrote: On May 4, 2014, at 7:45, Rik Cabanier caban...@gmail.com wrote: On Sat, May 3, 2014 at 10:32 PM, Eli Grey m...@eligrey.com wrote: The proposal

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Eli Grey
On Sun, May 4, 2014 at 4:11 PM, Ian Hickson i...@hixie.ch wrote: or you have to examine permissions that the application is requesting, and explicitly grant it the right to run on your machine I am not aware of this in any platforms. Can you provide one example of a platform that requests an

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Nils Dagsson Moskopp
Adam Barth w...@adambarth.com writes: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this functionality exists in every other platform (including iOS and Android). Some of the use cases for this feature

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Ian Hickson
On Sun, 4 May 2014, Adam Barth wrote: The world of computing has changed since 2009. At that time, the iPhone 3G had just been released and Apple hadn't even released the first iPad. The needs of the web as a platform have changed because now the web faces stiff competition from other

Re: [whatwg] Proposal: navigator.cores

2014-05-04 Thread Rik Cabanier
On Sun, May 4, 2014 at 8:35 PM, Ian Hickson i...@hixie.ch wrote: On Sun, 4 May 2014, Adam Barth wrote: The world of computing has changed since 2009. At that time, the iPhone 3G had just been released and Apple hadn't even released the first iPad. The needs of the web as a platform

[whatwg] Proposal: navigator.cores

2014-05-03 Thread Adam Barth
Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this functionality exists in every other platform (including iOS and Android). Some of the use cases for this feature have been discussed previously on this

Re: [whatwg] Proposal: navigator.cores

2014-05-03 Thread Rik Cabanier
On Sat, May 3, 2014 at 10:49 AM, Adam Barth w...@adambarth.com wrote: Over on blink-dev, we've been discussing [1] adding a property to navigator that reports the number of cores [2]. As far as I can tell, this functionality exists in every other platform (including iOS and Android). Some

Re: [whatwg] Proposal: navigator.cores

2014-05-03 Thread Eli Grey
The proposal specifically states using logical cores, which handles all of the CPUs you mentioned properly. Intel CPUs with hyperthreading enabled report logical cores as double the hardware cores. Depending on the version and configuration of the Samsung Exynos Octa big.LITTLE CPUs, you will get

Re: [whatwg] Proposal: navigator.cores

2014-05-03 Thread Rik Cabanier
On Sat, May 3, 2014 at 10:32 PM, Eli Grey m...@eligrey.com wrote: The proposal specifically states using logical cores, which handles all of the CPUs you mentioned properly. Intel CPUs with hyperthreading enabled report logical cores as double the hardware cores. Depending on the version and