Optimize parallel workers start-up#21203
Conversation
This comment has been minimized.
This comment has been minimized.
|
I decided to also increase our read size limit (just in case). Btw this makes me think that maybe we should set the same socket buffer size on Mac and Linux. On Linux it is fixed to 212992 bytes. While on Mac it is flexible/floating between 8192 bytes (checked using |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
This is a micro-optimization that gives fixed 50-100ms performance improvement. It is mostly important for "simple" runs, where one only modifies few files. Such runs are often sub-second, where this will be a visible win.
Two ideas here:
I am actually not 100% sure about second one, but I guess it should help in big code-bases. IIUC sockets are I/O, so it should be possible to speed it up using threads. I am also adding a bit more logging, so that we get more insight into communication overhead.
cc @JukkaL