Mailpile's JavaScript UI currently suffers from this jQuery memory leak. The cause is repeated calls to $(document).ready(), which seem to happen every time Mailpipe updates the UI.
The fix should be present in the next jQuery release.
Severity
I wrote a script that performed the following steps in a loop in a single session:
For the top four messages in the inbox:
Click on the message to view it.
Click on the inbox to return to the message listing.
Take a heap snapshot
I then graphed Mailpile's JavaScript heap size over each iteration of that loop:
The leak is noticeable, and may add up over a long session.
Here's a graph of Mailpile's memory usage with the memory leak fixed:
Thank you for the excellent bug report. I agree with your first two suggestions; the third is a bit harder since we rely on being able to call $(document).ready(...) from multiple locations as a simple way to keep the code loosely coupled; each fragment can have its own initialization logic without needing to coordinate with the rest of the page.
I am going to close this; it should get addressed when we update to the latest versions of everything (right before freezing 1.0), which is issue: #1800
Problem
Mailpile's JavaScript UI currently suffers from this jQuery memory leak. The cause is repeated calls to
$(document).ready()
, which seem to happen every time Mailpipe updates the UI.The fix should be present in the next jQuery release.
Severity
I wrote a script that performed the following steps in a loop in a single session:
I then graphed Mailpile's JavaScript heap size over each iteration of that loop:
The leak is noticeable, and may add up over a long session.
Here's a graph of Mailpile's memory usage with the memory leak fixed:
Possible Fixes
$(document).ready(function() {})
so often. I am not sure if this behavior is present in Mailpile or one of its dependency.The text was updated successfully, but these errors were encountered: