From 479100b2594a4c7bf999e4649f8d85d22f76c7c6 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 26 Jul 2018 14:47:10 +0300 Subject: Change: use PYYaml's CSafeDumper, for speed Speeds up order of 5-7 times in my test. --- slog-pretty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slog-pretty b/slog-pretty index bacff37..4660c00 100755 --- a/slog-pretty +++ b/slog-pretty @@ -22,7 +22,7 @@ def dump(f): obj = json.loads(line.strip()) yaml.dump( obj, stream=sys.stdout, indent=4, default_flow_style=False, - explicit_start=True, explicit_end=True) + explicit_start=True, explicit_end=True, Dumper=yaml.CSafeDumper) if len(sys.argv) == 1: -- cgit v1.2.1