From b76fd1bc87e5f5696371fac5ac3427aa867dec98 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Mon, 26 Sep 2011 11:47:30 +0200
Subject: [PATCH] serializer: Add comment about simplejson vs. built-in json

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/serializer.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/serializer.py b/lib/serializer.py
index ff27261aa..0a411b17e 100644
--- a/lib/serializer.py
+++ b/lib/serializer.py
@@ -29,9 +29,15 @@ backend (currently json).
 # C0103: Invalid name, since pylint doesn't see that Dump points to a
 # function and not a constant
 
-import simplejson
 import re
 
+# Python 2.6 and above contain a JSON module based on simplejson. Unfortunately
+# the standard library version is significantly slower than the external
+# module. While it should be better from at least Python 3.2 on (see Python
+# issue 7451), for now Ganeti needs to work well with older Python versions
+# too.
+import simplejson
+
 from ganeti import errors
 from ganeti import utils
 
-- 
GitLab