summary refs log tree commit diff
path: root/synapse/rest/media
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-06-28 14:49:57 +0100
committerGitHub <noreply@github.com>2018-06-28 14:49:57 +0100
commit6350bf925e8651f2fae70a1e7eb7182e9161c34a (patch)
tree35e766fcb2dabcd1e8978c417709b353d5fdf4bc /synapse/rest/media
parentRevert "Revert "Try to not use as much CPU in the StreamChangeCache"" (#3454) (diff)
downloadsynapse-6350bf925e8651f2fae70a1e7eb7182e9161c34a.tar.xz
Attempt to be more performant on PyPy (#3462)
Diffstat (limited to 'synapse/rest/media')
-rw-r--r--synapse/rest/media/v0/content_repository.py3
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/media/v0/content_repository.py b/synapse/rest/media/v0/content_repository.py
index 956bd5da75..e44d4276d2 100644
--- a/synapse/rest/media/v0/content_repository.py
+++ b/synapse/rest/media/v0/content_repository.py
@@ -22,8 +22,9 @@ from synapse.api.errors import (
 from twisted.protocols.basic import FileSender
 from twisted.web import server, resource
 
+from canonicaljson import json
+
 import base64
-import simplejson as json
 import logging
 import os
 import re
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py
index 565cef2b8d..adca490640 100644
--- a/synapse/rest/media/v1/preview_url_resource.py
+++ b/synapse/rest/media/v1/preview_url_resource.py
@@ -23,7 +23,8 @@ import re
 import shutil
 import sys
 import traceback
-import simplejson as json
+
+from canonicaljson import json
 
 from six.moves import urllib_parse as urlparse
 from six import string_types