{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/11457","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/11457/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/11457/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/11457/events","html_url":"https://github.com/numpy/numpy/issues/11457","id":337101218,"node_id":"MDU6SXNzdWUzMzcxMDEyMTg=","number":11457,"title":"numpy.testing accounts for almost 30 % import time","user":{"login":"kohr-h","id":5030250,"node_id":"MDQ6VXNlcjUwMzAyNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/5030250?v=4","gravatar_id":"","url":"https://api.github.com/users/kohr-h","html_url":"https://github.com/kohr-h","followers_url":"https://api.github.com/users/kohr-h/followers","following_url":"https://api.github.com/users/kohr-h/following{/other_user}","gists_url":"https://api.github.com/users/kohr-h/gists{/gist_id}","starred_url":"https://api.github.com/users/kohr-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohr-h/subscriptions","organizations_url":"https://api.github.com/users/kohr-h/orgs","repos_url":"https://api.github.com/users/kohr-h/repos","events_url":"https://api.github.com/users/kohr-h/events{/privacy}","received_events_url":"https://api.github.com/users/kohr-h/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-06-29T18:49:59Z","updated_at":"2018-07-01T20:41:40Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I just ran the brand new `python -X importtime -c \"import numpy\"`. Turns out that `numpy.testing` takes rougly 29 % (23 ms) of the total import time (80 ms), most of which (62 %, 14 ms) is the `unittest` module (no `nose` in my environment).  In view of #10856, this is only going to get worse -- `pytest` weighs in with about 35 ms on my machine.\r\n\r\nSo there's an opportunity for an easy win in import time by making the import of `numpy.testing` lazy. That is, *if* such a change doesn't cause huge amounts of downstream breakage.\r\nAlternatively, the main culprits could be imported lazily, with a much smaller downstream impact (likely none)."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/401631822","html_url":"https://github.com/numpy/numpy/issues/11457#issuecomment-401631822","issue_url":"https://api.github.com/repos/numpy/numpy/issues/11457","id":401631822,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTYzMTgyMg==","user":{"login":"mhvk","id":2789820,"node_id":"MDQ6VXNlcjI3ODk4MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/2789820?v=4","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"created_at":"2018-07-01T20:41:40Z","updated_at":"2018-07-01T20:41:40Z","author_association":"CONTRIBUTOR","body":"Wouldn't one use the `__getattr__` in `timing`, though? In that case it wouldn't slow down anything in the main namespace (of course, that would not help for deprecating `int`)."}}
{"actor":{"display_login":"mhvk"}}