Closed
Bug 1282606
Opened 8 years ago
Closed 8 years ago
Fix TrackingFlags and Bug object memory leaks
Categories
(bugzilla.mozilla.org :: Extensions, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dylan, Assigned: dylan)
References
Details
Attachments
(1 file, 3 obsolete files)
11.72 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Under heavy usage, the bug modal edit API will cause web workers to run out of memory every 60 seconds. It's a good idea to fix the memory leak now.
Assignee | ||
Updated•8 years ago
|
Version: Development/Staging → Production
Assignee | ||
Comment 1•8 years ago
|
||
This should fix much of the memory leaks. Running under mod_perl, you can run 'ab' against the bug modal API to test. -c 4 -n 1000 should result in frequent SizeLimit messages in the error log. With this patch applied, memory usage (for that API) should be nearly constant.
Attachment #8765642 -
Flags: review?(dkl)
Assignee | ||
Comment 2•8 years ago
|
||
This removes the majority of memory leaks from BMO.
Attachment #8765642 -
Attachment is obsolete: true
Attachment #8765642 -
Flags: review?(dkl)
Attachment #8765968 -
Flags: review?(dkl)
Assignee | ||
Comment 3•8 years ago
|
||
wrong patch. This one should work.
Attachment #8765968 -
Attachment is obsolete: true
Attachment #8765968 -
Flags: review?(dkl)
Attachment #8765969 -
Flags: review?(dkl)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8765969 -
Attachment is obsolete: true
Attachment #8765969 -
Flags: review?(dkl)
Attachment #8765972 -
Flags: review?(dkl)
Comment 5•8 years ago
|
||
Comment on attachment 8765972 [details] [diff] [review] 1282606_4.patch Review of attachment 8765972 [details] [diff] [review]: ----------------------------------------------------------------- mac-thor? Fix comments on commit. r=dkl ::: Bugzilla/Comment.pm @@ +241,5 @@ > sub bug { > my $self = shift; > require Bugzilla::Bug; > + my $bug = $self->{bug} ||= new Bugzilla::Bug($self->bug_id); > + weaken($self->{bug}); need to import 'weaken' at the beginning of Comment.pm ::: extensions/TrackingFlags/Extension.pm @@ +555,5 @@ > +sub request_cleanup { > + foreach my $flag (@FLAG_CACHE) { > + my $bug_flag = delete $flag->{bug_flag}; > + if ($bug_flag) { > + my $bug = delete $bug_flag->{bug}; nit: no need to assign to $bug, just do delete $bug_flag->{bug};
Attachment #8765972 -
Flags: review?(dkl) → review+
Assignee | ||
Comment 6•8 years ago
|
||
To git@github.com:mozilla-bteam/bmo.git 3bf65ba..9a15297 master -> master
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•8 years ago
|
Summary: Fix TrackingFlags memory leak → Fix TrackingFlags and Bug object memory leaks
Updated•4 years ago
|
Component: Extensions: TrackingFlags → Extensions
You need to log in
before you can comment on or make changes to this bug.
Description
•