{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4259","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4259/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4259/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4259/events","html_url":"https://github.com/astropy/astropy/issues/4259","id":112677720,"number":4259,"title":"FITS: Performance issue","user":{"login":"michaelaye","id":69774,"avatar_url":"https://avatars.githubusercontent.com/u/69774?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelaye","html_url":"https://github.com/michaelaye","followers_url":"https://api.github.com/users/michaelaye/followers","following_url":"https://api.github.com/users/michaelaye/following{/other_user}","gists_url":"https://api.github.com/users/michaelaye/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelaye/subscriptions","organizations_url":"https://api.github.com/users/michaelaye/orgs","repos_url":"https://api.github.com/users/michaelaye/repos","events_url":"https://api.github.com/users/michaelaye/events{/privacy}","received_events_url":"https://api.github.com/users/michaelaye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/io.fits","name":"io.fits","color":"c7def8"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Performance","name":"Performance","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-10-21T20:59:25Z","updated_at":"2015-10-22T18:02:16Z","closed_at":null,"body":"In this [FITS file](https://www.dropbox.com/s/r6qw7y8g5vvpnub/mvn_iuv_l1a_periapse-orbit01063-muvdark_20150417T234058_v02_r01.fits.gz?dl=0) reading out the `.data` object of the 6th (0-indexed counting), the HDU named \"Observation\" takes over 3 minutes  on my iMac 5K. \r\nThe table indicates a total size of 16 MB:\r\n\r\n```python\r\ndata.itemsize\r\n16777661\r\n```\r\nbut I don't believe that should be an issue, as indicated by our IDL reader, that has no noticeable delay in opening that file. \r\nIn case this is not an easy-to-fix performance bug with pyfits: Our group is creating these files, we can't change the structure of the files in terms of where is stored what, but maybe there are some `flags` that we can use to improve the structure internally on the binary level somehow?\r\n\r\nHere's the code I used to show the issue:\r\n```python\r\nfrom astropy.io import fits\r\nimport time\r\nfname = 'mvn_iuv_l1a_periapse-orbit01063-muvdark_20150417T234058_v02_r01.fits.gz'\r\nhdulist = fits.open(fname)\r\nt0 = time.time()\r\ndata = hdulist[6].data\r\nprint(time.time() - t0)\r\n\r\n193.38006591796875\r\n```"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/150307353","html_url":"https://github.com/astropy/astropy/issues/4259#issuecomment-150307353","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4259","id":150307353,"user":{"login":"michaelaye","id":69774,"avatar_url":"https://avatars.githubusercontent.com/u/69774?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelaye","html_url":"https://github.com/michaelaye","followers_url":"https://api.github.com/users/michaelaye/followers","following_url":"https://api.github.com/users/michaelaye/following{/other_user}","gists_url":"https://api.github.com/users/michaelaye/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelaye/subscriptions","organizations_url":"https://api.github.com/users/michaelaye/orgs","repos_url":"https://api.github.com/users/michaelaye/repos","events_url":"https://api.github.com/users/michaelaye/events{/privacy}","received_events_url":"https://api.github.com/users/michaelaye/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T18:02:16Z","updated_at":"2015-10-22T18:02:16Z","body":"Well, thanks for your interactive help, it surely removes some hurdles for now! Try to enjoy your vacation nevertheless! ;)"}}