[PATCH] Allow GUID buf-> struct GUID to avoid talloc
Andrew Bartlett
abartlet at samba.org
Fri Apr 22 04:09:00 UTC 2016
While looking into performance issues, I noticed that we call talloc()
a lot while parsing GUIDs, particularly in LDB. We parse a lot of
GUIDs in LDB, and in general call talloc() way too much.
This patch keeps the PIDL generated parser, but instead uses stack
variables and never calls talloc().
I realise the new ndr_pull_struct_blob_all_noalloc() could be mis-used,
but I figure setting mem_ctx to (void*)-1 should catch that pretty
fast.
Found with perf and FlameGraph visualisation.
Thoughts?
Thanks,
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libndr-Add-ndr_pull_struct_blob_all_noalloc.patch
Type: text/x-patch
Size: 4422 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160422/0dfdd510/0001-libndr-Add-ndr_pull_struct_blob_all_noalloc.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ldb-samba-Use-ndr_pull_struct_blob_all_noalloc.patch
Type: text/x-patch
Size: 1823 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160422/0dfdd510/0002-ldb-samba-Use-ndr_pull_struct_blob_all_noalloc.bin>
More information about the samba-technical
mailing list