File: performance.inc.rst

package info (click to toggle)
astropy 3.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,664 kB
  • sloc: ansic: 168,124; python: 147,173; sh: 11,313; lex: 7,215; xml: 1,710; makefile: 463; cpp: 364
file content (22 lines) | stat: -rw-r--r-- 936 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.. note that if this is changed from the default approach of using an *include*
   (in index.rst) to a separate performance page, the header needs to be changed
   from === to ***, the filename extension needs to be changed from .inc.rst to
   .rst, and a link needs to be added in the subpackage toctree

.. _astropy-io-fits-performance:

.. TODO: determine whether the following is quantitatively true, and either
.. uncomment or remove.

.. Performance Tips
.. ================
..
.. By default, :func:`astropy.io.fits.open` will open files using memory-mapping,
.. which means that the data is not necessarily read into memory until it is
.. needed. While memory-efficient, if memory is not a concern for you, you may
.. find that you can get better performance by turning memory mapping off, which
.. forces the data to be read into memory immediately:
..
.. .. doctest-skip::
..
..     >>> fits.open('example.fits', memmap=False)