[Python-checkins] cpython: Add note on memory usage to LZMACompressor doc.

nadeem.vawda python-checkins at python.org
Mon Jan 2 01:25:14 CET 2012


http://hg.python.org/cpython/rev/ca36b2b66500
changeset: 74231:ca36b2b66500
parent: 74229:86e2603f6adb
user: Nadeem Vawda <nadeem.vawda at gmail.com>
date: Mon Jan 02 02:24:20 2012 +0200
summary:
 Add note on memory usage to LZMACompressor doc.
files:
 Doc/library/lzma.rst | 12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst
--- a/Doc/library/lzma.rst
+++ b/Doc/library/lzma.rst
@@ -120,8 +120,16 @@
 ``9`` (inclusive), optionally OR-ed with the constant
 :const:`PRESET_EXTREME`. If neither *preset* nor *filters* are given, the
 default behavior is to use :const:`PRESET_DEFAULT` (preset level ``6``).
- Higher presets produce smaller output, but make compression more CPU- and
- memory-intensive, and also increase the memory required for decompression.
+ Higher presets produce smaller output, but make the compression process
+ slower.
+
+ .. note::
+
+ In addition to being more CPU-intensive, compression with higher presets
+ also requires much more memory (and produces output that needs more memory
+ to decompress). With preset ``9`` for example, the overhead for an
+ :class:`LZMACompressor` object can be as high as 800MiB. For this reason,
+ it is generally best to stick with the default preset.
 
 The *filters* argument (if provided) should be a filter chain specifier.
 See :ref:`filter-chain-specs` for details.
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /