Comment 65 for bug 320057

Revision history for this message
David Inman (davei) wrote :

In Thunderbird 38.3.0 I saw very long waits accessing a company ldap of several thousand entries.
In short, while composing a message, characters typed were matched against ldap as they were entered.
Using Wireshark to examine the ldap packets, it was determined that the filter used to collect the
matching entries was of the form '*chars*' where 'chars' are those I had typed into the "To:" line of a
new email. There were three such patterns compared against different fields in ldap. The problem lies
in the very inefficient '*' at each pattern's beginning. For normal use of the ldap completion of an email
address this is a waste. The comparison is too general for the application. Of course if it ran fast enough
I wouldn't be as concerned. In my case, however, it takes some 30 seconds of searching per character I type.

The fix was a line like this in my prefs.js file with Tbird shutdown:
    user_pref("ldap_2.servers.<my_server>.autoComplete.filterTemplate", "(|(cn=%v1*)(mail=%v1*)(sn=%v1*))");

where you replace '<my_server>' with your own. Note that '%v1*' was previously '*%v1*' in each case.
You should find your prefs.js under ~/.thunderbird/...

Now the response to each character in the 'To:' line of an email runs much less than a second, and progressively
faster as more characters are entered. All as it should be.