Open Bug 1697364 Opened 4 years ago Updated 2 years ago

HTML Email with large table with inline image references eats up gigabytes of RAM - loads full mail into memory for each image.

Categories

(Thunderbird :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: wd, Unassigned)

References

Details

(Keywords: dupeme, perf, testcase)

Attachments

(1 file, 1 obsolete file)

Attached is a mostly-sanitized (but not necessarily minimized) HTML email that was generated from a Confluence page change. Upon rendering this email message as HTML, Thunderbird uses gigabytes and gigabytes of RAM until the OS is virtually unusable.

I'm using 78.8.1 (64-bit) on macOS Big Sur

Steps to reproduce:

  1. Open attached EML file
  2. Make sure that messages are viewed in Original HTML

Actual results:
Seemingly unending consumption of available RAM.

Expected results:
Reasonable amount of RAM usage

Thanks for the testcase.

These issues tend to be duplicates. Perhaps one of https://mzl.la/3rv3UCy but I'm not sure this is a good query

Keywords: dupeme, testcase
Attachment #9207980 - Attachment is obsolete: true
Attached file minimized_testcase.eml

I've whittled down my original test case to something much more minimal. It's basically this:

A large HTML table where each cell refers to an inline image in the EML file. It's only about 2MB in size, but it causes Thunderbird to eat up as much RAM as is available on my computer.

Summary: Large HTML table eats up gigabytes of RAM → HTML Email with large table that has references to inline image eats up gigabytes of RAM

The test mail contains 41,340 table cells.

The image has 32x32 pixel * 32 bit = 4 kB RAW data. * 41'340 = 161 MB - Peanuts 😉

I have created two variants of the test mail. One with 10'000 and one with 15'000 cells. My TB can display these successfully.
With the 10'000-mail the TB temporarily uses ~6.3 GB RAM and with the 15'000 mail it is 13.8 GB.

The 10'000-mail is 524 kB in size. * 10'000 = ~5 GB
The 15'000-mail is 785 kB in size. * 15'000 = ~11,2 GB

It seems that TB loads the complete mail into memory for each image.

Thank you Alfred for that analysis!

https://mzl.la/3GdlFNl

  • Possibly bad before version 78 - Bug 1512974 - very slow to read complicated mail with images
  • Perhaps worse in 78.
  • Looks like even worse in version 91 - Bug 1741136 (and others) - Locks up with in-lined images. Takes down Windows Explorer (not the web browser) in about 1 minute
Severity: -- → S2
Keywords: perf
See Also: → 1741136
Summary: HTML Email with large table that has references to inline image eats up gigabytes of RAM → HTML Email with large table that has references to inline image eats up gigabytes of RAM - loads the complete mail into memory for each image.
OS: macOS → All
Hardware: x86_64 → All
See Also: → 1556748
Severity: S2 → S3
Summary: HTML Email with large table that has references to inline image eats up gigabytes of RAM - loads the complete mail into memory for each image. → HTML Email with large table with inline image references eats up gigabytes of RAM - loads full mail into memory for each image.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: