From: Evgeniy Khramtsov Date: Sun, 18 Nov 2012 02:17:27 +0000 (+1000) Subject: Make terms serialization faster X-Git-Tag: v2.1.12~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9208f4dd50f31e8e17c439b89f180a03794ab7f5;p=ejabberd Make terms serialization faster --- diff --git a/src/odbc/ejabberd_odbc.erl b/src/odbc/ejabberd_odbc.erl index 6ac5414ba..aea0fdda0 100644 --- a/src/odbc/ejabberd_odbc.erl +++ b/src/odbc/ejabberd_odbc.erl @@ -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 ++ "."),