Skip to content

Conversation

@negezor
Copy link

@negezor negezor commented Jun 27, 2024

Summary

Currently, we subscribe to the browser events click, keyup, scroll, and resize every time the mediumZoom function is called, which also happens during clone. Instead of always being subscribed to these events, it is much better to subscribe only when necessary. These events stack up on each other, significantly affecting performance and preventing the browser from garbage collecting. This is especially important in SPA applications when we use a component-based approach.

Result

No performance degradation when images are missing or not active.

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.

1 participant