html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/5640#issuecomment-888411101,https://api.github.com/repos/pydata/xarray/issues/5640,888411101,IC_kwDOAMm_X8409BPd,35968931,2021-07-28T15:37:06Z,2021-07-28T15:37:55Z,MEMBER,"But in both cases we always check for the existence of cftime via `import cftime`, so *if* python is clever enough to remember that cftime doesn't exist the second time it's asked to import it, then where is the opportunity for speedup?
Hopefully @lusewell can enlighten us :sweat_smile: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,954574705
https://github.com/pydata/xarray/pull/5640#issuecomment-888379766,https://api.github.com/repos/pydata/xarray/issues/5640,888379766,IC_kwDOAMm_X84085l2,35968931,2021-07-28T14:57:11Z,2021-07-28T14:57:11Z,MEMBER,"Thanks for the suggestion @lusewell .
I'm a bit confused as to how exactly this improves performance though - you've moved the location of the `import cftime` statement to the top of the file, but I was under the impression that [python doesn't ever import a module more than once](https://stackoverflow.com/questions/19077381/what-happens-when-a-module-is-imported-twice), because [after the first time it's a fast hash lookup](https://stackoverflow.com/questions/296036/does-python-optimize-modules-when-they-are-imported-multiple-times). So surely in both cases we only look for the existence of `cftime` once? Perhaps I've misunderstood though?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,954574705