VOTE: proposal to strip out pdb_context and pdb_methods chaining

Jelmer Vernooij jelmer at samba.org
Wed Feb 15 00:17:32 GMT 2006


On Tue, Feb 14, 2006 at 06:53:25AM -0600, Gerald (Jerry) Carter wrote about 'Re: VOTE: proposal to strip out pdb_context and pdb_methods chaining':
> Jelmer Vernooij wrote:
> > I don't think the overhead is that big. It's simply 
> > an extra parameter to all the passdb function calls. The '
> > only problem is that all the code that uses the
> > passdb simply calls functions that then call the 'real'
> > functions with a static context. The only problem I 
> > see is the pdbedit -i -e stuff, which would be broken
> > by this, though that could probably be fixed by having
> > some kind of dump format.
> I think you are Andrew are rasing the same concern.
> (Andrew, I'll just reply to you message here as well).
> The concern fo overhead is not performance, but maintenance
> and debugging.  You have to steps through about 3 layers
> of function pointers to get to the real code implementing
> a function.  And when you change thje API, you have to
> change it in all three layers.  That's too much.
The way it is currently implemented is indeed a problem, but an extra
argument to prevent global variables shouldn't cause much overhead.
The problem are the layers. If the code that uses passdb knew about
the contexts, that'd for example eliminate one layer of function
calls. Having a pdb_context passed around everywhere doesn't
necessarily make the code more complicated or harder to debug, but the 
current (or rather, previous) implementation did. 

> At the moment, I have broken import/export in pdbedit, but
> it will be cleared up before 3.0.22 so we won;t actually
> be throwing away any functionality.  Just simplifying the
> code.
Ok, that certainly makes sense to me. I was just worried about losing
functionality, and the import/export thingy was certainly something I
consider very useful.

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://jelmer.vernstok.nl/
Currently playing: Blackmore's Night - Mr. Peagram's Morris And Sword
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20060215/a6bb22f0/attachment.bin


More information about the samba-technical mailing list