Why does it take so long to start a parallel pool on a local profile? It's only 10 seconds or so, but for a job that should simply thread across the cores of the host machine's CPU it should be nearly instantaneous.
I spent some time reworking a bit of code we use frequently to run in parallel. The runtime went from 10 seconds to around 2 which I was very happy with. Our use case, though, only requires running a few jobs at a time. Over time it would add up to a pretty nice time savings except that every time the user runs the code they need to wait for parpool to run. The 15 seconds there means that it's only worth using the parallel code I worked so hard on if they're going to be running more than a handful of jobs at a time which is rare. The result is that my time producing parallel code was wasted because Matlab inexplicably needs time to set up a pool of workers on the host machine that Matlab itself is running on. Is there any way around this because it makes no sense?
Best Answer