25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Make terms serialization faster

This commit is contained in:
Evgeniy Khramtsov 2012-11-18 12:17:27 +10:00 committed by Alexey Shchepin
parent dfcdf1ca7a
commit 9208f4dd50

View 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 ++ "."),