[RFC] Making talloc_parent faster
Volker.Lendecke at SerNet.DE
Sat Jun 26 04:50:19 MDT 2010
On Sat, Jun 26, 2010 at 08:07:33PM +1000, Andrew Bartlett wrote:
> So, in short, this changes the O(n) from talloc_parent to
> While I am by far no expert in talloc (and as Volker has said, Tridge is
> the talloc maintainer), my understanding of the talloc_reference()
> discussion was that talloc_parent() should be avoided were at all
> possible, as it breaks the multi-parent abstraction (parents and
> references combined into multiple parents).
> In Samba, we have generally avoided using talloc_parent() except it was
> impossible to rework the code to do otherwise. Is it not possible to
> pass the parent along with the context in your application?
> (I would generally prefer not to slow down talloc_realloc())
To me from an API point of view it is very confusing that
talloc_parent() can be slow, given the mainly hierarchical
nature of the talloc structures. It should be just following
a simple pointer. We should either ditch talloc_reference or
ditch the talloc_parent call I think. They just are in
conflict with each other.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the samba-technical