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.
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 thevue-utilities
library, but rather the underlyingmousetrap
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 themousetrap
project may no longer be maintained.