Message235860
Benchmark on NFS. Client: my laptop, connected to the LAN by wifi. Server: desktop, connected to the LAN by PLC. For an unknown reason, the creation of files, symlinks and directories is very slow (more than 30 seconds while I reduced the number of files & directories).
Test listdir+stat vs scandir+is_dir
Temporary directory: /home/haypo/mnt/tmp5aee0eic
Create 1000 files+symlinks...
Create 1000 directories...
# entries: 3000
Benchmark...
listdir: 14478.0 ms
scandir: 732.1 ms
listdir: 9.9 ms
scandir: 14.9 ms
listdir: 7.5 ms
scandir: 12.9 ms
Remove the temporary directory...
Result:
listdir: min=7.5 ms (2.5 us per file), max=14478.0 ms (4826.0 us per file)
scandir: min=12.9 ms (4.3 us per file), max=732.1 ms (244.0 us per file)
scandir is between 0.0x and 1119.6x faster |
|
Date |
User |
Action |
Args |
2015-02-12 22:19:54 | vstinner | set | recipients:
+ vstinner, tebeka, pitrou, giampaolo.rodola, tim.golden, benhoyt, abacabadabacaba, akira, socketpair, josh.r |
2015-02-12 22:19:54 | vstinner | set | messageid: <1423779594.03.0.611229382909.issue22524@psf.upfronthosting.co.za> |
2015-02-12 22:19:54 | vstinner | link | issue22524 messages |
2015-02-12 22:19:53 | vstinner | create | |
|