New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greatly reduces application JavaScript memory leak #7215

Merged
merged 2 commits into from Sep 1, 2017

Conversation

Projects
None yet
6 participants
@rmedlyn
Contributor

rmedlyn commented Aug 23, 2017

Removed clone statement from jquery-bootgrid destroy function that was causing anything in a bootgrid table to persist and not get garbage collected. Also added some code to make sure a table is emptied of elements and event listeners on widget refresh. If those are too much, calling destroy on its own after the fix still significantly reduced the leak. I also realize that my minification might be a bit different than the original. I can take a look at that if it's a concern.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926


This change is Reviewable

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Aug 23, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Aug 23, 2017

CLA assistant check
All committers have signed the CLA.

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Aug 24, 2017

Member

I see there is a PR for this upstream. Perhaps it is best to get it fixed there as someone may just update the bootgrid files later, removing your fix.

At least you should comment on that PR to help it get merged.

rstaib/jquery-bootgrid#216

Member

murrant commented Aug 24, 2017

I see there is a PR for this upstream. Perhaps it is best to get it fixed there as someone may just update the bootgrid files later, removing your fix.

At least you should comment on that PR to help it get merged.

rstaib/jquery-bootgrid#216

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Aug 24, 2017

Member

This library hasn't had an update in 2 years. We could just fork it and maintain this patch locally or merge in expect that no further updates are to be provided upstream.

Member

laf commented Aug 24, 2017

This library hasn't had an update in 2 years. We could just fork it and maintain this patch locally or merge in expect that no further updates are to be provided upstream.

@f0o

f0o approved these changes Aug 24, 2017

@rmedlyn

This comment has been minimized.

Show comment
Hide comment
@rmedlyn

rmedlyn Aug 24, 2017

Contributor

At this point, I think that maintaining a fork seems to be the best long-term option short of porting to a more up-to-date library like DataTables.

Contributor

rmedlyn commented Aug 24, 2017

At this point, I think that maintaining a fork seems to be the best long-term option short of porting to a more up-to-date library like DataTables.

@murrant

This comment has been minimized.

Show comment
Hide comment
@murrant

murrant Aug 24, 2017

Member

Yeah, unfortunate, bootgrid does look unmaintained.

This PR looks good after you fix the conflict. It looks like your branch might be out of date with master or something.

Member

murrant commented Aug 24, 2017

Yeah, unfortunate, bootgrid does look unmaintained.

This PR looks good after you fix the conflict. It looks like your branch might be out of date with master or something.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Aug 24, 2017

Member

@rmedlyn Are you able to fix the conflict?

Member

laf commented Aug 24, 2017

@rmedlyn Are you able to fix the conflict?

@murrant murrant added this to the 1.31 milestone Aug 25, 2017

@rmedlyn

This comment has been minimized.

Show comment
Hide comment
@rmedlyn

rmedlyn Aug 28, 2017

Contributor

Should be fixed now. Sorry for the delay.

Contributor

rmedlyn commented Aug 28, 2017

Should be fixed now. Sorry for the delay.

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Aug 28, 2017

The inspection completed: No new issues

scrutinizer-notifier commented Aug 28, 2017

The inspection completed: No new issues

@rmedlyn

This comment has been minimized.

Show comment
Hide comment
@rmedlyn

rmedlyn Sep 1, 2017

Contributor

@laf Does everything look okay now?

Contributor

rmedlyn commented Sep 1, 2017

@laf Does everything look okay now?

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Sep 1, 2017

Member

Testing

Member

laf commented Sep 1, 2017

Testing

@laf laf merged commit 6077d3a into librenms:master Sep 1, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@rmedlyn rmedlyn deleted the rmedlyn:MemoryLeakFix branch Sep 21, 2017

@rmedlyn rmedlyn restored the rmedlyn:MemoryLeakFix branch Sep 21, 2017

@rmedlyn rmedlyn deleted the rmedlyn:MemoryLeakFix branch Sep 21, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.