Speedup decodeUnicodeEscape by avoiding useless string replace.
@@ -117,6 +117,10 @@ def decodeUnicodeEscape(s):
s is a unicode string
replace ``\\n`` and ``\\u00AC`` unicode escapes
"""
+ if "\\" not in s:
+ # Most of times, there are no backslashes in strings.
+ return s
+
s = s.replace("\\t", "\t")
s = s.replace("\\n", "\n")
s = s.replace("\\r", "\r")
