bcolz icon indicating copy to clipboard operation
bcolz copied to clipboard

use try/except when reading chunk instead of using os.path.exists

Open bordingj opened this issue 8 years ago • 1 comments

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.

bordingj avatar Sep 15 '16 10:09 bordingj

That's a nice suggestion. Could you send the profile? As always, a PR is very welcome.

FrancescAlted avatar Sep 15 '16 11:09 FrancescAlted