Open heapcrash opened 3 years ago
Requests could be a proxy object that would import the actual module on demand (pwntools does not even use it anywhere, but exports it in the namespace on a "you would need it anyway" basis). But SSL imports could be deferred too. Also, rpyc is a time consumer, and is only used by object-oriented GDB procedures. See #1753 for some work already done.
It looks like we've regressed pretty far on import times for Python3.
The most offending modules can be seen with the following command. It looks like we can shave off a lot of time by deferring imports of requests, site, urllib3, and ssl. We should investigate more places that we can defer imports until they're actually needed.