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

Lots of InteractionObservers #3

Open
bobmoff opened this issue Apr 2, 2018 · 2 comments
Open

Lots of InteractionObservers #3

bobmoff opened this issue Apr 2, 2018 · 2 comments
Labels
help wanted not-assigned Tasks that are not assigned

Comments

@bobmoff
Copy link

bobmoff commented Apr 2, 2018

Hi!

Was just wondering about this component, when used on page with lots of things to observe, like an image gallery of similar, it would create am InteractionObserver for each usage instead of reusing a single observer.

Do you know if this would matter that much to performance or so ?

Perhaps if the observer options are the same, it could reuse it for multiple elements ?

@tkjaergaard tkjaergaard added the Planned Planned to be implemented label Apr 9, 2018
@tkjaergaard tkjaergaard self-assigned this Apr 9, 2018
@tkjaergaard
Copy link
Contributor

@bobmoff, Yeah you're absolutely right. We might be better of having some sort of factory which creates Observes based on the configuration settings. This does however require some rewriting of the codebase and additional tests, but i think it's absolutely doable.

In my experience there is no direct performance implications when having multiple observes, but that of cause depends on the amount of observable elements that one might have.

@tkjaergaard tkjaergaard added help wanted not-assigned Tasks that are not assigned labels Dec 19, 2018
@tkjaergaard tkjaergaard removed their assignment Dec 19, 2018
@tkjaergaard tkjaergaard removed the Planned Planned to be implemented label Mar 5, 2020
@MartinMalinda
Copy link

I didn't hit any performance problems even when using thousands of intersection observers. It didn't show up in profiling at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted not-assigned Tasks that are not assigned
Projects
None yet
Development

No branches or pull requests

3 participants