Skip to content
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

Fork mousetrap to fix listener leak #46

Conversation

scottwittenburg
Copy link
Collaborator

It seems the issue which affected our performance so badly, with over 100K event listeners attached to the DOM after scanning through many images, was not caused by v-mousetrap from the vue-utilities library, but rather the underlying mousetrap library itself.

This issue in mousetrap was identified and this PR to fix it were submitted over two years ago, but neither have received any attention from the maintainer since that time. In fact, the maintainer of that project may have moved on to other things, as the last accepted PR was around a year ago.

To verify the fix mentioned above, which looks to me like it should solve the problem, I pushed it to my fork of mousetrap and have tried it out here. It works as advertised, so we could take this approach for now in order to solve our performance problem. However, we may want to look for another approach to key binding, since the mousetrap project may no longer be maintained.

@scottwittenburg scottwittenburg force-pushed the fork-mousetrap-to-fix-listener-leak branch from 684a143 to 8554168 Compare January 6, 2021 04:06
Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

@scottwittenburg
Copy link
Collaborator Author

Addresses #43

@scottwittenburg scottwittenburg force-pushed the fork-mousetrap-to-fix-listener-leak branch from 8554168 to 961eba0 Compare January 12, 2021 18:14
@scottwittenburg scottwittenburg merged commit 8aa3bfc into OpenImaging:master Jan 12, 2021
@scottwittenburg scottwittenburg deleted the fork-mousetrap-to-fix-listener-leak branch January 12, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants