bcolz
bcolz copied to clipboard
use try/except when reading chunk instead of using os.path.exists
I found that a significant amount of time is spend in built-in method nt.stat() when reading in a carray. The nt.stat() is used by os.path.exists() which is called every time a chunk is read. I suggest to use try/except instead of checking whether the chunkfile exists everytime a chunk is read.
That's a nice suggestion. Could you send the profile? As always, a PR is very welcome.