Use libconfsyscpus to correctly report CPU count?

Some folks have been been experiencing radically slow Elm builds on CircleCI - one person reported a build taking 24 minutes instead of 9 seconds - which turned out to be because sysconf misreports the number of CPUs the instance actually has access to.

libsysconfcpus lets you adjust the number of CPUs that sysconf reports. This person confirmed that this fixes the problem for his individual CircleCI build by running it before running his tests. Presumably it could be used on all instances to have them report accurate core counts. This would help not only Elm tests but any other tests that run in parallel.

1 Like