The emailextrecipient gets the author by
ChangeSet getAuthor()

This gets the Name of the author. Then I guess it needs to find the email 
address.
But how does it do that?
Does it look up the name in LDAP?
What would it do if LDAP was not configured in Jenkins?

It would be so much easier if it just could call
ChangeSet getAuthorEmail()

A build that had changes with 11 authors, used a little over 10 minutes to 
run emailextrecipient.

I made my own code snippet to do pretty much the same, and it should be 
considerably faster (not yet tested).

def getAuthors(build) {
    final def authors = []
    final def changeSets = build.changeSets
    for (def cs: changeSets) {
        final def author = cs.getAuthorEmail()
        authors.add(author)
    }
    return authors.join(" ")
}



onsdag 29. april 2020 11.45.16 UTC+2 skrev r.fuereder følgende:
>
> Ad LDAP: we are also using another configuration element, but again, this 
> may not be kriegs-entscheidend
>
> userSearchBase: "CN=Users"
>
>  
>
> If you know that it is the emailextrecipients step and it is really that 
> slow, then you could maybe find the problem when remote debugging into 
> Jenkins?
>
>  
>
> But I guess that email-ext insider Slide might have much better hints…
>
>  
>
> HTH Reinhold
>
>  
>
> *From:* jenkins...@googlegroups.com <javascript:> <
> jenkins...@googlegroups.com <javascript:>> *On Behalf Of *Sverre Moe
> *Sent:* Mittwoch, 29. April 2020 10:44
> *To:* Jenkins Users <jenkins...@googlegroups.com <javascript:>>
> *Subject:* Re: The pipeline emailextrecipients step takes too long time
>
>  
>
> This had no or very little impact on the time used by emailextrecipient.
>
>  
>
> Disbled email resolver against LDAP
>
> Enabled LDAP cache
>
>  
>
> Checked a build that was built in Jenkins after changing these settings.
>
> The emailextrecipients took 98274 milliseconds, almost 2 minutes, for 2 
> authors in the change sets.
>
>  
>
> /Sverre
>
> tirsdag 28. april 2020 22.52.06 UTC+2 skrev Sverre Moe følgende:
>
>  
>
> Found this setting in Configure Global Security for LDAP:
>
> Disable Ldap Email Resolver
>
> I ticked it, now I will see if that can help the issue.
>
>  
>
>  
>
> LDAP Caching:
>
> I had not enabled cache.
>
> Enabled it, and set Size=100, TTL=1 hour
> Does this mean that the cache only lives for 1 hour? That seems a little.
>
>  
>
> /Sverre
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/172bfdd6-f04e-4011-b0c0-5062585c80a2%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/172bfdd6-f04e-4011-b0c0-5062585c80a2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/840db5f2-eae2-48c3-bca8-22da86a9c158%40googlegroups.com.

Reply via email to