On systems with incredibly high RLIMIT_NOFILE (either intentionally or by accident) this can take quite a large amount of time.
Instead of checking them all, just stop after enough free ones have been encountered. 100k is a rather large number for that but the time needed to do this is quite low. My system does about about 7 million per second.
Closes #600
Disclaimer: I haven't properly tested this since I don't know how. I'd love some pointers on that.
On systems with incredibly high
RLIMIT_NOFILE
(either intentionally or by accident) this can take quite a large amount of time. Instead of checking them all, just stop after enough free ones have been encountered. 100k is a rather large number for that but the time needed to do this is quite low. My system does about about 7 million per second.Closes #600
Disclaimer: I haven't properly tested this since I don't know how. I'd love some pointers on that.