Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FeatureDetection.hardwareConcurrency #1834

Merged
merged 1 commit into from
Jun 17, 2014
Merged

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Jun 16, 2014

Chrome Canary recently added navigator.hardwareConcurrency which exposes the number of physical cores on the client. This is a simple change to expose that value (or a default if not defined) on FeatureDetection.

I chose 3 as the fallback based on Steam's hardware survey, which shows 2 cpus 47.26% of the time and 4 cpus 44.94%.

This will be handy when we do #1487 (probably post 1.0), but is useful immediately for Primitive creation.

On a related note, is FeatureDetection going to be public or private, because if it's public, it's missing a bunch of documentation.

Chrome Canary recently added `navigator.hardwareConcurrency` which exposes the number of physical cores on the client.  This is a simple change to expose that value (or a default if not defined) on `FeatureDetection`.

I chose 3 as the fallback because according to Steam's hardware survey (http://store.steampowered.com/hwsurvey/) (2 cpus 47.26% 4 cpus 44.94%)

This will be handy when we do #1437 (probably post 1.0), but is useful immediately for `Primitive` creation.
@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 16, 2014

is FeatureDetection going to be public or private

Doesn't matter to me.

I chose 3 as the fallback...

This should be good for mobile too, right?

@mramato
Copy link
Contributor Author

mramato commented Jun 16, 2014

This should be good for mobile too, right?

Yes, most mobile devices are actually quadcore. "budget" phones may still be dual-core, but they aren't going to be able to run Cesium anyway.

pjcozzi added a commit that referenced this pull request Jun 17, 2014
@pjcozzi pjcozzi merged commit 1cc6abe into master Jun 17, 2014
@pjcozzi pjcozzi deleted the hardwareConcurrency branch June 17, 2014 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants