]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Add instructions on using libyaml
authorWillem de Groot <gwillem@gmail.com>
Thu, 27 Aug 2015 09:19:31 +0000 (11:19 +0200)
committerWillem de Groot <gwillem@gmail.com>
Thu, 27 Aug 2015 09:19:31 +0000 (11:19 +0200)
For a 10x speed increase!

README.rst

index 768e850a82e88eb14e6dfd3f66da31ea2ceff892..e8ac807b34e6fc6c0da6da7ba31970c4880eb80b 100644 (file)
@@ -573,6 +573,24 @@ If you set the loglevel to DEBUG, you will also get information about
 which matchers didn't match. This can help you with debugging custom
 matchers.
 
+Speed
+-----
+VCR.py runs about 10x faster when pyyaml can use the libyaml extensions. However, just installing ``libyaml`` (Mac) or `libyaml-dev`` (Linux) is not enough, as pyyaml needs to be rebuild with the proper flag. Note that this flag is cached by pip, so clear the cache first. 
+
+Are you using libyaml already? This should work:
+
+::
+
+    python -c 'from yaml import CLoader'
+
+If not:
+
+::
+
+    pip uninstall pyyaml
+    pip --no-cache-dir install pyyaml
+
+
 Upgrade
 -------