I discovered a memory leak in the materialize dependency. Every time you call
material_select, the dependency installs a global
click handler on
window, but never cleans it up.
handleLimit, which is called every time a new DataTable is created via
bindEventsAndApplyStyle. On the default Piwik dashboard, this occurs every time the dashboard is refreshed.
I'm filing this ticket here so you are aware of this leak, if you wish to avoid it at some point. If materialize does not fix this issue, a hackfix could be to remove all jQuery window-level
click handlers when the page refreshes
It looks like this is not a bug that materialize is willing to fix. They made a suggestion concerning how you could fix this.
I am unable to help further with this bug, but I hope this information helps you should you decide to look into the leak.
Thanks @jvilk for all your leaks investigation :+1:
We likely won't fix that as it should be a small leak.
@mattab Materialize fixed this issue in v100.2, if you're willing to upgrade.
@jvilk thanks for the notice. Yes, we'd be willing to upgrade, maybe you'd like to open a pull request with the upgraded library? It would automatically run all our UI tests which would help detect any regression automatically. Thanks