Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

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

Open
bordingj opened this issue Sep 15, 2016 · 1 comment
Open

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

bordingj opened this issue Sep 15, 2016 · 1 comment

Comments

@bordingj
Copy link

bordingj commented Sep 15, 2016

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.

@FrancescAlted
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants