talloc: Tune talloc_vasprintf
authorVolker Lendecke <vl@samba.org>
Fri, 10 Jan 2014 09:45:22 +0000 (10:45 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 10 Mar 2015 09:55:39 +0000 (10:55 +0100)
commit9d9eb307165938a8c829ebd518434850cc0280a6
tree2f34bd697512c7eaeb445150d34156e70957aae0
parent57a06cd5d630979effcadc63a9e362153f3b3bd3
talloc: Tune talloc_vasprintf

vsnprintf is significantly more expensive than memcpy. For the
common case where the string we print is less than a kilobyte, avoid
the second vsnprintf.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 15 12:49:14 CEST 2014 on sn-devel-104

(cherry picked from commit 593c8103af5a5ed6b3c915369fed5b90efb42c25)
lib/talloc/talloc.c