arq5x / poretools

a toolkit for working with Oxford nanopore data
MIT License
239 stars 90 forks source link

Allow poretools to iterate through directories in inode order #150

Open nickloman opened 7 years ago

nickloman commented 7 years ago

On some file systems reading files in inode order is considerably faster than in the (?random) order returned by os.walk. This may be because inode order more faithfully represents the physical location of files on disk and therefore enables more efficient file access (e.g. by reducing seeking). Consider scanning the directory with something like scandir() and then walking through the files in inode order.