opto / Text-Insert

0 stars 0 forks source link

TB is unresponsive for a couple of seconds at beginning a new message, complains about fuzzy.js #7

Open cluster15 opened 7 months ago

cluster15 commented 7 months ago

When opening a new message, TB becomes unresponsive for a couple of seconds. Lately, it started to throw an error message:

A script from the extension “Text Insert: Templates/AutoUp/Typo-correct” is running on this page, and making Thunderbird unresponsive.

It may be busy, or it may have stopped responding permanently. You can stop the script now, or you can continue to see if it will complete.

Script: moz-extension://c56ecc79-f1b2-…db-5e83b0f3a17d/FuzzySearch.js:2129
opto commented 7 months ago

which language are you using for typo-correct? I assume it might be German, because that has a big dictionary, or is it some other?

cluster15 commented 7 months ago

Yes, it's German, but I am not using typo-correct, it is not activated in the settings. Nevertheless TB freezes for a couple of seconds and complains.

opto commented 7 months ago

I will check whether the dictionary is maybe always loaded, irrespective of being used.

cheonman commented 3 months ago

I encounter the same hangs, same line in FuzzySearch.js, and I also don't use a dictionary.

I found that if I enclose the lines 127 and 128 in textinsert.js with if (opt.autoupWords && (opt.lang == "de-DE")) { it does not hang anymore. It seems like the dictionary fuzzy search is always loaded, as you suspected. I am not sure if my suggestion has unwanted side effects, but since I'm not using the dictionary, I suppose I won't encounter them.

Edit: I just found the other options in ti-background.js: "autoup", "autoupNoSpace", "autoupWords", "typocorrect". So perhaps the if clause I suggested above needs to be expanded to include those as well.