]> granicus.if.org Git - ejabberd/commitdiff
Make terms serialization faster
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sun, 18 Nov 2012 02:17:27 +0000 (12:17 +1000)
committerAlexey Shchepin <alexey@process-one.net>
Thu, 22 Nov 2012 14:18:48 +0000 (16:18 +0200)
src/odbc/ejabberd_odbc.erl

index 6ac5414bae6a89e625be2a064b22e69d390a50bb..aea0fdda0303fb08b84bad7cd11c0cde3421a38b 100644 (file)
@@ -172,7 +172,7 @@ to_bool(1) -> true;
 to_bool(_) -> false.
 
 encode_term(Term) ->
-    escape(erl_prettypr:format(erl_syntax:abstract(Term))).
+    escape(lists:flatten(io_lib:print(Term))).
 
 decode_term(Str) ->
     {ok, Tokens, _} = erl_scan:string(Str ++ "."),