> On Apr 11, 2016, at 7:23 AM, Antoine Pitrou <[email protected]> wrote:
> 
> On Mon, 11 Apr 2016 07:08:19 -0400
> Donald Stufft <[email protected]> wrote:
>> 
>> I’m not sure if that is still the case with modern SSDs, but I think the 
>> idea is that by putting everything inside of zip files you reduce the number 
>> of stat calls that Python needs to do (they flip side of this is that 
>> pkg_resources is incredibly slow because it needs to issue a ton of stat 
>> calls on import).
> 
> I don't think SSDs have anything to do in it since the kernel should
> cache directory contents, rather it's the number of system calls issued.
> But as Paul says, in Python 3 importlib got a lot of optimization work
> on this front, so this advice probably doesn't apply anymore.
> 

Surely SSDs are faster at returning the data (metadata or actual data) than 
spinning rust and thus would speed up importing on their own. Sure you might 
have that data cached in memory if you’ve recently accessed it, but you just as 
easily might not have that data cached and the OS might need to hit the disk to 
find out.


-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to