Pasting many recipients as a string into the composer recipient widget is very slow or fails

Assigned to


2 years ago
2 years ago


(Reporter: aceman, Assigned: aceman)


({hang, perf})

hang, perf

Firefox Tracking Flags

(Not tracked)




2 years ago
Pasting many recipients as a string into the composer recipient widget is very slow and may even fail with many recipients.

Steps to reproduce:
1. Use attachment to generate many recipients
2. Specify 10000
3. Select 10000 email addresses after "To:", Copy
4. Compose a message,
5. click into recipient widget after To:
6. paste the 10000 email addresses
7. Press Enter?

Expected result:
TB should convert the recipients into 10000 individual rows.

Actual result:

This took about 10 minutes for me on current trunk (which is already optimized in this code from bug 1292097).

In between it was popping up the unresponsive script dialog pointing on
That is code 'addressText.replace(/.* >> /, "")'. Maybe the regexp is totally inefficient on such a long string.

After 10 minutes it failed with:
"too much recursion - addressingWidgetOverlay.js:1158:1"

It seems to be because AutomatedAutoCompleteHandler.autoCompleteNextAddress() and AutomatedAutoCompleteHandler.processAllResults() call each other.

Comment 1

2 years ago
(Show me the mail provider that lets you send to more than - say - 200 recipients.)

Comment 2

2 years ago
Enterprises may allow that.

This came from bug 619493 and you know the other bug about 4000 recipients :)
Summary: Message with too many email addresses in TO: or CC: field hangs TB. Need to sanity check display of addresses. → Pasting many recipients as a string into the composer recipient widget is very slow or fails

Comment 3

2 years ago
Enterprises maintain mailing lists. Anyway, I'm not arguing against improving or fixing things, I'm just questioning the use case.

Comment 4

2 years ago
Yes, they may have mailinglists or groups. But even in Outlook you can expand the list. So you may send or receive such a message.

Comment 5

2 years ago
I confirm the call to addressText.replace(/.* >> /, "") really is part of the problem.
It takes 8 minutes by itself.

Must be a pathological case for a regexp.
I also wonder what it really wants to do.
If the passed string is
"name1" <a@b.c>, "name2 >> name3" <d@e.f>
it will completely kill the first recipient. That surely isn't what it wanted :)
(In reply to Jorg K (GMT+2, PTO during summer) from comment #3)
> Enterprises maintain mailing lists. ... I'm just questioning the use case.

"Some" needs to be in front of that sentence.  The percentage of users may be small, but it is will be an important set of users. 

We see examples cited in the field, and I personally know people who routinely pasted large lists. Not all enterprises are sophisticated to do mail groups. Not all examples of lists make sense for making mail groups. Etc. (I cannot speak however to what numbers of addresses may be the norm, nor the max)
Severity: normal → major


2 years ago
Duplicate of this bug: 1279383
You need to log in before you can comment on or make changes to this bug.