Improving performance of winbindd_list_groups
Volker.Lendecke at SerNet.DE
Thu Apr 24 12:44:03 GMT 2008
On Tue, Apr 22, 2008 at 06:25:01PM -0700, Steven Danneman wrote:
> >On Mon, Apr 07, 2008 at 11:27:28AM -0700, Steven Danneman wrote:
> >> My proposal is to rewrite winbindd_list_groups() (and subsequently
> >> winbindd_list_users()) to asynchronously enumerate groups from all
> >> known domains simultaneously using async_domain_request() and calling
> >> get_sam_group_entries() from the winbindd_child_dispatch_table.
> >Go, Steven, Go! :-))
> Ok, attached is healthy chunk of code making the WINBINDD_LIST_GROUPS
> handler function asynchronous. It was pretty straightforward once I
> wrapped my head around the various levels of calls and callbacks
> required to communicate between parent and child.
> If you like this approach, I'll apply the same changes to
Looks very good to me, thanks!
Just a quick comment: In listgroups_recv you're using
talloc_asprintf to paste the results together. These strings
can get *very* long, so you might want to use
talloc_asprintf_append_buffer, which does not use strlen for
the existing string.
Jerry, what do you think about this patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080424/051019f4/attachment.bin
More information about the samba-technical