Giter Club home page Giter Club logo

Comments (5)

danhper avatar danhper commented on May 14, 2024 2

I think we could set ASDF_CONCURRENCY before delegating the build to the plugin,
so that plugin writers do not have to do this check on their own.

On Windows gnu make does not support concurrent jobs, so it doesn't matter.

Does that means that make -j2 would break, or simply be noop?

from asdf.

michalmuskala avatar michalmuskala commented on May 14, 2024 1

The GNU make documents it as being a noop on windows:

https://www.gnu.org/software/make/manual/html_node/Parallel.html

On MS-DOS, the ‘-j’ option has no effect, since that system doesn’t support multi-processing.

It talks about MS-DOS, so I'm not sure it applies to modern windowses as well.

It could probably detect it on a best effort basis and set to 1 otherwise. It will still be better than the current situation.

from asdf.

HashNuke avatar HashNuke commented on May 14, 2024

@michalmuskala If parallel is good, then let us make the asdf plugins use the parallel flag by default atleast for languages that are known to work well with it.

from asdf.

michalmuskala avatar michalmuskala commented on May 14, 2024

I see that each plug-in has entirely separate code from the core manager, so each one would need to solve this on it's own.

The really tricky part is deciding on the number of concurrent jobs. A good rule is the number of cores, but the issue is there's no easy cross-platform way of determining it.
In order of how easy to use they are:

  • On modern linux there should be nproc command
  • On OSX you can use sysctl -n hw.ncpu
  • On older linux (or some stripped down versions) you can go through /proc/cpuinfo: grep -c processor /proc/cpuinfo
  • On Windows gnu make does not support concurrent jobs, so it doesn't matter.

from asdf.

danhper avatar danhper commented on May 14, 2024

@michalmuskala

On MS-DOS, the ‘-j’ option has no effect, since that system doesn’t support multi-processing.
It talks about MS-DOS, so I'm not sure it applies to modern windowses as well.

Thanks.
I will try to check in a VM or something, but at least it should probably not emit any error.

It could probably detect it on a best effort basis and set to 1 otherwise. It will still be better than the current situation.

I agree. I will try to add this feature during the week.

from asdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.