<div dir="ltr"><div><div><div><div>The POSIX dynamic loader processes one module at a time.  If you have a lot of shared libraries, each with a lot of symbols, this creates unneeded serialization (despite the use of TaskRunners during symbol loading, there is still quite a bit of serialization when loading a library).<br><br></div>In order to parallelize this, I actually had to do two things.  Neither one makes any difference, only the combination improves performance (I left them as separate patches for clarity):<br><br></div>1. Change the POSIX dynamic loader to fork each module into its own thread.  I didn't use TaskRunner because some of the called functions use TaskRunner, and it isn't recursion safe.  The final modules are added to the list in the original order despite whatever order the threads finish.<br><br></div>2. Change Module::AppendImpl to fire off some expensive work as a separate thread.<br><br></div>These two changes bring startup time down from 36 (assuming the previously mentioned crc changes) seconds to 11.  It doesn't improve efficiency, it just increases parallelism.<br><br></div>