Closed Bug 363113 Opened 14 years ago Closed 13 years ago

Thunderbird autocomplete freezes up to 1 minute after typing one or two characters of an email adress

Categories

(Thunderbird :: Message Compose Window, defect, major)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evo, Assigned: mscott)

References

Details

(Keywords: fixed1.8.0.10, fixed1.8.1.1, verified1.8.1.3)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1pre) Gecko/20061204 Thunderbird/2.0b1 - Build ID: 2006120414

I have a problem where in compose a new message or reply or forward a message if I try to use the auto complete function TB will freeze for up to a minute or so before I can continue typing.  Very frustrating if I am trying to send to more than 3 or for recipients as it can take ages.  If I shut down and restart TB the problem goes away for a little while but ultimately is always there and always replicable

Reproducible: Always

Steps to Reproduce:
1.either send new message or reply or forward windwo
2.select the To CC or Bcc drop down
3.try to type in an address manually into the To,Cc or Bcc box
I can confirm this. The delay gets longer the longer TB is open. It seems to /always/ clear on a restart.

In my case I only have one additional address book with a total number of contacts of about 300. All of my accounts are POP accounts.

I don't see this on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061208 Thunderbird/2.0b1 ID:2006120804 using a local address book. 

Are you using a local address book?

yes I am using a local address book why do you ask?
ldap address books can cause hiccups during autocomplete, if it takes a while to connect to them.
At the other bug, this was offered as a suggestion:
  http://kb.mozillazine.org/Long_time_to_open_address_book
Did this apply to your situation?
I have cleaned out my prefs.js file before i have followed the instructions in the forum on this issue.  I actually had hundreds of these lines and find now that after a small use some come back I have copied the lines for you to see

user_pref("ldap_2.servers.default.filename", "default.mab");
user_pref("ldap_2.servers.default.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.default.uri", "moz-abldapdirectory://default.mab");

I can delete these lines however not only do they continue to come back but even after deletion I note that the problem does not seem to go away with the autocomplete.  I did however notice an improvement in speed opening my address book after I deleted the many mab lines in my prefs.js file.  

I seems to me like the programme is just chewing up allocated memory and cannot move till it has freed some up.  I may be wrong I am no programmer that is for sure, but one thing I can tell you is it is very very frustrating and has only manifested itself in the last few weeks.  I am considering going back to the release build but there are features in 2 that I like
thanks for your comments
(In reply to comment #6)
> I have cleaned out my prefs.js file before i have followed the instructions
> in the forum on this issue.  I actually had hundreds of these lines and find
> now that after a small use some come back I have copied the lines for you to
> see
> 
> user_pref("ldap_2.servers.default.filename", "default.mab");
> user_pref("ldap_2.servers.default.replication.lastChangeNumber", 0);
> user_pref("ldap_2.servers.default.uri", "moz-abldapdirectory://default.mab");
> 
> I can delete these lines however not only do they continue to come back but

Did you follow the link from the above document to bug 230580?  Altho, if you're using 2b1, you shouldn't be seeing the prefs come back.  
Note bug 230580 comment 77 identifies an extension which seems to keep this problem going, as does using an address book from Outlook or Outlook Express.
*** Bug 363595 has been marked as a duplicate of this bug. ***
Confirmed 

(Additional information from my bug 363595 )

******************************************** 


Hello ...
I'm using TB 2.0 b1pre  (2006121104) on windows XP SP2

For 2 weeks (i guess at least 20061204xx) , i'm experiencing periodically a
freeze of TB during autocomplete of email adress ...

for example i want to write to me ... i start to type "jeanm" to see the
different emails ... and TB freeze for 30 seconds (and with 100% cpu) and then
automatically give me only one adress, without choice (after minimising the
compose window).
This is not always reproducible ... sometimes, it works very well ... but i
noticed after some time of using the problem is there

I have to tell
1) my adressbook open very quickly (less of 1 second), so this is not this bug:
http://forums.mozillazine.org/viewtopic.php?t=468910&highlight=address+book+slow

2) this is not this bug:
http://kb.mozillazine.org/Long_time_to_open_address_book
i had a lot of        ldap2.servers._nonascii_xx and 
ldap_2.servers.user_directory_xx in my prefs.js ... i've deleted it  ... but
problem stay ...

3) https://bugzilla.mozilla.org/show_bug.cgi?id=200804#c21 seems to have the
same problem than me

4) i've not find similar bug in bugzilla ...
Just this bug refering to autocomplete in seamonly which landed to branch at
the end of november ... don't know if it can affect TB: Bug 255731
(https://bugzilla.mozilla.org/show_bug.cgi?id=255731)

5) seems not related to bug 330501
(https://bugzilla.mozilla.org/show_bug.cgi?id=330501) ... but ... who knows :-)

Is someone have the same problem?
thanks

PS: 
1) I use only local adress books (Directory server: none and unchecked):
"Personnal adress book" with 1175 entries (auto-add when sending to a new
adress)
"adressbook" with 270 entries and 4 mailing lists

2) I have only lighting 0.4a1, talkback and nightly tester tools as add-on

*************************************


Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: auto complete freezes after typing one or two characters → Thunderbird autocomplete freezes up to 1 minute after typing one or two characters of an email adress
Version: unspecified → 2.0
(In reply to comment #9)
Yes I wouldn't have described it better ! I'm exactly in the same situation as you, with the same trouble.
Yes I'll back you up on your comments I am having exactly the same issues as you and have no idea how to fix it.  If I restart TB it seems to be just fine for a while but then back to the same old freeze problem not long after
Here, other users having the same symptoms ...
http://forums.mozillazine.org/viewtopic.php?t=493280
I haven't been able to reproduce this yet, but it seems like several folks are. 
Flags: blocking-thunderbird2?
I notice this too now - we seem to be searching all the mailing lists as well as the ab's, which doesn't seem neccessary since anything in a mailing list is also in the containing ab, iirc.
I did the prefs.js thing, removed all the lines relating to servers.nonascii (I actually only have one mab file).  Seemed to speed things up at first, but later was somewhat slow again sometimes. No new lines have appeared in prefs.js so it seems this was not the whole of my problem.
there are also a bunch of directory_11, directory_12, etc prefs (sorry, don't have the exact name in front of me) that might be involved.
user_pref("ldap_2.prefs_migrated", true);
user_pref("ldap_2.servers.EudoraNicknames.position", 0);
user_pref("ldap_2.servers.EudoraNicknames_1.position", 0);
user_pref("ldap_2.servers.EudoraNicknames_2.position", 0);
user_pref("ldap_2.servers.OutlookExpressAddressBoo.position", 0);
user_pref("ldap_2.servers.OutlookExpressAddressBoo_1.position", 0);
user_pref("ldap_2.servers.OutlookExpressAddressBoo_2.position", 0);
user_pref("ldap_2.servers.PMTIC.position", 0);
user_pref("ldap_2.servers._nonascii.filename", "_nonascii.mab");
user_pref("ldap_2.servers._nonascii.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers._nonascii.uri", "moz-abldapdirectory://_nonascii.mab");
user_pref("ldap_2.servers.adressbook.description", "adressbook");
user_pref("ldap_2.servers.adressbook.dirType", 2);
user_pref("ldap_2.servers.adressbook.filename", "impab-1.mab");
user_pref("ldap_2.servers.adressbook.isOffline", false);
user_pref("ldap_2.servers.adressbook.protocolVersion", "2");
user_pref("ldap_2.servers.adressbook.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.default.filename", "default.mab");
user_pref("ldap_2.servers.default.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.default.uri", "moz-abldapdirectory://default.mab");
user_pref("ldap_2.servers.history.replication.lastChangeNumber", 0);
user_pref("ldap_2.servers.pab.replication.lastChangeNumber", 0);
user_pref("ldap_2.user_id", 46);


I just can say that one i've launch TB, it is very quick ... after 2-3 hours, it takes 2-3 seconds ... and at the end, it takes centuries :-)
Flags: blocking-thunderbird2? → blocking-thunderbird2+
from searching, looks like I got bit by this one too.
was running 1.06 with zero problems
complete fresh install, win xp, serv pack 2
loaded 1.5 at same time, same configurations as before
my co. uses IMAP server and address book. trend micro is the virus scanner
right out the gate when adding address to a reply to: email, t'bird hung for approx ten seconds
in address field, if I type in multiple letters, more than one, it hangs
if I enter in just one letter, like "a" as part of "alan.eldridge@yahoo.com" it autofills immediately and I'm able to press on
I only have my personal address book, my company address book and the collected address book.  and since it's a new install (three days worth!) there's not a whole lot in them.
none of the other suggested fixes like compacting and editing the .js file work.
I did re-install the 1.06 version, but of course it's using all the current configs and it now hangs.
haven't done the drastic thing of uninstalling and deleting *everything*, but I'm going to have to, to get any work done (if that fixes it)
Can someone with this problem take a look at their prefs.js file and confirm the values they have for the following preferences, thanks.

ldap_2.autoComplete.interval
ldap_2.autoComplete.enabled
ldap_2.autoComplete.useDirectory
ldap_2.autoComplete.useAddressBooks
ldap_2.autoComplete.skipDirectoryIfLocalMatchFound
ldap_2.autoComplete.directoryServer

I don't know if this'll help us, but it might ;-)
I didn't find the word autocomplete in my prefs.js file at all.

Since deleting them a few days ago I have had a lot of mab lines come back in my prefs.js file, also settings for a printer that I no longer have on my computer.  Generally speaking my autocompletes have not been quite so slow as they were before I deleted the superfluous lines a week or so ago.
(In reply to comment #19)
> Can someone with this problem take a look at their prefs.js file and confirm
> the values they have for the following preferences, thanks.
> 
> ldap_2.autoComplete.interval
> ldap_2.autoComplete.enabled
> ldap_2.autoComplete.useDirectory
> ldap_2.autoComplete.useAddressBooks
> ldap_2.autoComplete.skipDirectoryIfLocalMatchFound
> ldap_2.autoComplete.directoryServer
> 
> I don't know if this'll help us, but it might ;-)
> 

I cannot find any such autoComplete lines in my pref.js file either
Mark, 

In the order you asked for 'em, my values are 650, true, false, true, "".

-- 
Stuart
FWIW, I recovered back to 1.0.6 on my PC after posting the message yesterday.
after uninstalling, I went to documents and settings and also program files folder and removed all references to t'bird.

there is now *no* delay.  this was the only variable, there have been no other changes/additions on my PC. (but we knew it was something with 1.5 anyway ///grin///)  

tony, per your request I pulled my old .js file, this is the *only* line listing that has autocomplete in it.  I can email/post the complete thing if you wish:

user_pref("ldap_2.autoComplete.useDirectory", true);
On my side, I do experience to autocomplete freeze, but have no reference at all to "autocomplete" in my prefs.js file !
I note that this issue is still unresolved has anybody found a solution to this annoying bug, for me it seems to be getting worse over time.  There must be a developer somewhere that is or has been hit by this bug that has a work around. I'm wondering if I should go back to 1.5.09.
thanks for the offer Alan but I can't see you sending me your file will fix my issue.  

cheers
There is, of course, a workaround, namely to use the Contacts bar (click the contacts icon).  Restarting often helps too.
Peter that is what I am currently doing, thank for the reply, only issue for me there is I have over 200 email addresses and using the Contacts bar although successful as far as this is concerned is cumbersome and time consuming at times. 
This bug is really annoying. It renders TB more or less useless. The often takes longer than the actual mail itself..

I have the same problems as others have mentioned here. Using TB 2.0 Beta 1 with ~600 in Outlook.

Have any TB developer zoomed in on the issue or have it only been discussed among its users so far?
I was going to move the severity up to Major, but I can't for the life of me see how to edit Status, Severity etc in the new Bugzilla.  And yes, I am logged in.
I seems to be restricted to admin level or similar in this Bugzilla installation.
(In reply to comment #29)
> I was going to move the severity up to Major, but I can't for the life of me
> see how to edit Status, Severity etc in the new Bugzilla.  And yes, I am logged
> in.
> 

As I started the post I will try from this end Peter see how it goes 
Severity: normal → major
OK, I've reproduce this, and I see what's going on - every mailing list is getting added to the mSubDirectories array every time we do an autocomplete. So the mSubdirectories array grows like crazy, slowing down the search. Here's the stack trace:

#0	0x02aa7227 in nsAbMDBDirectory::AddDirectory at nsAbMDBDirectory.cpp:346
#1	0x02a99cf8 in nsAddrDatabase::CreateABList at nsAddrDatabase.cpp:3614
#2	0x02a9a040 in nsAddrDatabase::GetMailingListsFromDB at nsAddrDatabase.cpp:3425
#3	0x02ab02a9 in nsAbMDBDirFactory::CreateDirectory at nsAbMDBDirFactory.cpp:163
#4	0x02aacbea in nsAbBSDirectory::CreateDirectoriesFromFactory at nsAbBSDirectory.cpp:97
#5	0x02aadeb5 in nsAbBSDirectory::GetChildNodes at nsAbBSDirectory.cpp:196
#6	0x02a9f635 in nsAbAutoCompleteSession::SearchDirectory at nsAbAutoCompleteSession.cpp:551
#7	0x02a9ff27 in nsAbAutoCompleteSession::OnStartLookup at nsAbAutoCompleteSession.cpp:693

I'll try to figure out how to avoid this...
Attached patch proposed fixSplinter Review
every time we were iterating over a db with mailing lists, we were adding the lists as sub-directories of the db/parent directory. Over time, this produced a huge number of sub-directories (all with the same rdf resource, so you didn't see extra ones in the ab directory pane).

Autocomplete did this, as did checking if an address was in the directory, e.g., for image whitelisting.
Attachment #250379 - Flags: superreview?(mscott)
Attachment #250379 - Flags: superreview?(mscott) → superreview+
fixed on trunk and branch - I wonder if this was happening in 1.5.0.x as well...I'll check that quickly.
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: fixed1.8.1.1
Resolution: --- → FIXED
Comment on attachment 250379 [details] [diff] [review]
proposed fix

1.5.0.x has this code problem too - I don't know if the mSubDirectories array grows as fast in 1.5.0.x, but it definitely grows for every autocomplete...I'll want this to bake on the trunk for a bit, but nominating for the branch to keep it on the radar.
Attachment #250379 - Flags: approval1.8.0.10?
Comment on attachment 250379 [details] [diff] [review]
proposed fix

Approved for 1.8.0 branch, a=jay for drivers.
Attachment #250379 - Flags: approval1.8.0.10? → approval1.8.0.10+
(In reply to comment #33)
> every time we were iterating over a db with mailing lists, we were adding the
> lists as sub-directories of the db/parent directory. Over time, this produced a
> huge number of sub-directories (all with the same rdf resource, so you didn't
> see extra ones in the ab directory pane).
> 
> Autocomplete did this, as did checking if an address was in the directory,
> e.g., for image whitelisting.

David, so it is .mab files (with mail lists) that are affected?  What should one look for in the file?  And is export/import the recommended process to clean it up?  Thx
The .mab files aren't affected - it's purely in-memory structures that grow like topsy. (Note, this fix is only for people who have the problem go away when they shutdown TB and restart). For those people, they don't need to do anything to clean up.

The exploding prefs problem is different - it's unclear to me if that's truly fixed for all cases yet...
fix landed on 1.8.0 branch, for 1.5.0.10
Keywords: fixed1.8.0.10
Problem seems fixed for me on Thunderbird 3 Alpha 1 nightlies (trunk), not sure which nightly it first was fixed in, was not fixed immediately, but ok now on 20070107 at least.
seems fixed on 1.8.1.1 branch (TB 2.0b1 2007010404)
I still have this problem in TB 2.0 beta2 (TB uses Outlook Calendar).

Will this bug be reopened or should I file a new bug?
I'm not seeing it here with v2b2, in fact I've not had it at all even when TB has been running some time.

Is there any chance to you run without the Outlook Calendar for a while and see if that is what's causing the problem?
Well, it kinda beats the purpose - I am in desperate need of my contacts in Outlook Calendar, but sure anything to resolve this bug.

I'm suspecting that my issue is not the exact same as this one since the time for how long TB have been running has no impact on this. The problem is the same immediately after startup as when I've had it running for days.

What do you want me to do?

1) Disable integration will Outlook Calendar (will have to look that up somewhere, because I forgot how I did)

2) Try to reproduce without the integration

Do I have to add contacts in the address book or is the problem the same nonetheless?
I'd suggest disabling the integration and trying to reproduce the problem.

If, as you say the problem manifests itself on start up you'll know wheather or not ditching Outlook has any impact. If the problem goes away without integration enabled I'd be tempted to log it as a new bug as the issue, whilst having the same symptoms, is very different from the original.
Stuart,

I tried to disable the Outlook integration by reverting the instructions on 
http://kb.mozillazine.org/index.php?title=Using_Outlook_(Express)_contacts_with_Thunderbird_or_Mozilla_Mail&printable=yes.
Hence, I simply removed the user.js from my profiles directory.

However, when I restart TB the OP Contacts still show as an address book!
I checked so that there is no TB process still running, but haven't restarted the machine.

Because of this I can't test without Outlook integration.
Do you have any idea what could cause the OP Contacts to still show?
Notaclue. Sorry. Hopefully there'll be a grown up along in a moment to help.
Hope so. I'll be waiting...
I would really appreciate if someone from the Thunderbird Team would take the time to get back to me in order to solve my problem. It is quite irritating and it renders TB more or less useless - since writing a mail always includes waiting for one minute or so while the contact is looked up.
are there outlook ab specific prefs now written to your prefs.js? Removing those might help. There might be prefs that refer to OP Contacts, for example. Removing all the prefs with that same directory could help.
@Stuart the problem went away when I disabled Outlook integration!
I filed a new bug report (#368355).

@David Thank you. There were some settings in prefs.js as well (I knew about user.js).

Well that something I suppose.

Good luck with it.
bug #368355 that I reported much in common with this one. I reported it over a month ago, but still no developer have picked it up. What can I do in order for it to receive some attention?
verified fixed 1.8.1.3 using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 ID:2007032620 - Auto complete on email address is working fine after some tests with Tbird 2 RC. (i tested this without outlook integration)
Keywords: verified1.8.1.3
this fix did not solve bug #368355 as it still exists in 2.0.0.0rc1
You need to log in before you can comment on or make changes to this bug.