-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Move to requiring go1.7 #3093
Comments
Also worth noting, in order to support macOS Sierra, we need to use go1.7 |
I am all for it, but we should then publish dev releases to dist page periodically, as some systems will take few weeks or months to adopt 1.7 compiler. |
|
Also much ❤️❤️❤️❤️❤️❤️❤️❤️ to net with context :)
|
go1.7 is now required for building master of ipfs. We can close this now :) |
go1.7 brings many awesome improvements that we benefit greatly from.
Some highlights:
at least 10% (up to 35%) performance improvement in crypto/sha256 and math/big
These are hard cpu bottlenecks in various aspects of ipfs. Improving these will make ipfs feel faster all over (especially during
ipfs add
on faster disks). It will also make ipfs use less cpu in general.context
adopted into stdlibthe context is a very core component to how we write good concurrent code. Having this in the standard library will clean up our dependency tree quite a bit, as well as making it easier to write better concurrent code all around. Our dependencies will also be more likely to integrate contexts into their code (looking at you yamux!).
net.DialContext
This one is huge. We currently have lots of issues down the network stack with different blocking calls not respecting contexts, it leads to things not feeling very responsive, and consuming wayyy more resources than they need to. In this particular instance, for dialing, we make N (around 10) concurrent outbound dials per peer we try to connect to, one for each address we know they might be reachable at. If we dial an incorrect address, the only way currently to end that is to wait for the timeout. Even if another dial succeeds, that dial has to block until it times out, holding open a file descriptor all the while. Having that call respect contexts will greatly improve our file descriptor consumption.
So what do we need to do?
Using the context changes will be backwards incompatible with previous versions of go. When we decide to implement these, anyone wanting to compile ipfs from source will have to use go1.7
Since we provide pre-built binaries, i think its acceptable to quickly set this as a build requirement. What do you all think?
Relevant PRs:
The text was updated successfully, but these errors were encountered: