[PATCH] group_mapping: Avoid a talloc
Volker.Lendecke at SerNet.DE
Wed Jan 8 23:42:18 MST 2014
On Thu, Jan 09, 2014 at 11:01:28AM +1300, Andrew Bartlett wrote:
> The issue I have is that the previous discussion ([PATCH] s3: set native
> os according to Windows and NBT_ANNOUNCE_VERSION defines) was over code
> used in session setup, and this instance is the only justification was:
> "Hi!Please review & push!". If someone says 'this is a hot path', then
> I'm happy to go with that, but I just don't see how this is 'hot'
> compared with the tdb access that must follow?
> I'm still concerned, but a little explanation and justification would
> greatly reduce my worries here, because it feels like the standard is
> 'remove all talloc where we think we can use a fixed string', rather
> than 'remove avoidable talloc in the hot path'.
For me it's definitely the former. I will not actively
remove talloc without some proof that it shows up in
profiles, but when I touch code I will be very careful about
Every single time I do profiling, talloc shows up really
high on the list. After having to learn this session over
and over again I said to myself that it's enough. talloc is
expensive and if there is a simple and clear stack-based
alternative, use the alternative.
No doubt it's satisfying to gain a few percent after some
performance work, but I would be much happier if we never
got into the position to gain a measurable difference with
some small changes.
Don't get me wrong: talloc is an extremely worthwhile
abstraction and it is the single most valuable single that
Tridge has brought to Samba, but it comes with significant
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical