Use simplejson if present instead of the stdlib json module.
The simplejson parser drop-in compatible with the builtin python JSON parser, but much faster. In particular, this makes operations like reindexing quicker.
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ..exceptions import TransportError, HTTP_EXCEPTIONS
|
from ..exceptions import TransportError, HTTP_EXCEPTIONS
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import time
|
import time
|
||||||
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from ..exceptions import TransportError, ConnectionError, ImproperlyConfigured
|
from ..exceptions import TransportError, ConnectionError, ImproperlyConfigured
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
import json
|
import json
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|||||||
Reference in New Issue
Block a user