Email::Address caches all email addresses

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
Extensions: UserProfile
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dylan, Assigned: dylan)

Tracking

Production

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
The Email::Address module maintains a cache of email addresses. I think we should be clearing this in _cleanup().

I think also caching should be disabled when USAGE_MODE is command line.
This might also benefit other areas that relate to email and crazy memory usage.

https://metacpan.org/pod/Email::Address#purge_cache

Disabling cache makes my elastic search indexer get a lot farther.
(Assignee)

Comment 1

2 years ago
Created attachment 8716822 [details] [diff] [review]
1246413_1.patch
Attachment #8716822 - Flags: review?(dkl)
Comment on attachment 8716822 [details] [diff] [review]
1246413_1.patch

I do not see anything in _cleanup() as mentioned in comment 0. Was this omission intentional?
Flags: needinfo?(dylan)
(Assignee)

Comment 3

2 years ago
It happens in request_cleanup(), which is called by _cleanup. (Currently a BMO fix, but it should be upstream too)
Flags: needinfo?(dylan)
Comment on attachment 8716822 [details] [diff] [review]
1246413_1.patch

Review of attachment 8716822 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl
Attachment #8716822 - Flags: review?(dkl) → review+
(Assignee)

Comment 5

2 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   009b23d..7e8c053  master -> master
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.