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

Endless scroll performance – detach & keep position? #174

Open
mmikkel opened this issue Sep 25, 2014 · 10 comments
Open

Endless scroll performance – detach & keep position? #174

mmikkel opened this issue Sep 25, 2014 · 10 comments
Labels
Milestone

Comments

@mmikkel
Copy link

mmikkel commented Sep 25, 2014

Hi,

I'm battling an issue with endless scrolling and performance. When the container reaches a certain height (around 55k px on my computer which is a fairly powerful one, so I'd assume earlier on a weaker device) the FPS begins to drop significantly, to the point where its almost impossible to scroll any further.

Obviously this is not a Wookmark specific issue – in general I'm awed by Wookmarks great performance – there are just too many elements in the DOM. Even Wookmarks endless scroll demo gets into troubled waters around the 88k px mark.

Pinterest actually solves this very issue by dynamically detaching and re-attaching any elements that fall out of bounds, but I'm having trouble implementing a similar fix –

Figuring out which elements are safely outside the viewport bounds isn't difficult – problem is, I can't figure out how to maintain the visible Wookmark items' position whenever stuff is removed from (or appended to) the DOM. Ideally, if I removed the first 50 elements in the grid, I'd want the next 50 (that are currently visible) to maintain their relative position – as if the first 50 were still there. Is this even possible with Wookmark?

If anybody has any light to shed on the subject – that'd be great :)

@darrensw
Copy link

I'm very interested in this too.

@mmikkel
Copy link
Author

mmikkel commented Sep 26, 2014

I have a few ideas on how to implement it, but I'm going to look at Pinterest's implementation first. If I manage to incorporate something like it in Wookmark and its half-way decent I'll share it here :)

@Sebobo
Copy link
Member

Sebobo commented Sep 26, 2014

Hi,

interesting topic.
I’m currently working on the 2.0 release in the no-jquery branch.
This could also be something which could fit in the release, as I am doing a lot of speed improvements and refactoring. Making the „layout“ function only look for new elements and ignoring the old ones should help with this issue. It only breaks when the whole layout is triggered.

@darrensw
Copy link

Sounds good - I'm also interested in a non JQuery version as I'm slowly moving away from it - it's great but sometimes native is just as many lines without the library read which can only speed up any app

@Sebobo Sebobo added this to the 2.0.0 milestone Oct 1, 2014
@Sebobo Sebobo added the Feature label Oct 1, 2014
@Sebobo
Copy link
Member

Sebobo commented Feb 15, 2015

I just release v2. And it should be much faster.
I haven't implemented the "only-visible" layouting but still it should help.
Will move this to 2.1

@Sebobo Sebobo modified the milestones: 2.1.0, 2.0.0 Feb 15, 2015
@mmikkel
Copy link
Author

mmikkel commented Feb 15, 2015

Sweet, thank you @Sebobo!

@Sebobo
Copy link
Member

Sebobo commented Jun 3, 2015

@mmikkel did you try the 2.0?

@Sebobo Sebobo modified the milestones: 2.2.0, 2.1.0 Mar 10, 2016
@Sebobo Sebobo self-assigned this Mar 10, 2016
@zilions
Copy link

zilions commented Mar 16, 2016

Very interested in this too. My web application supports endless scrolling, and on mobile devices it starts bugging out after a while...

@zilions
Copy link

zilions commented Mar 16, 2016

Might be a good start, but Angular Grid just implemented "performance scroll" - https://github.com/s-yadav/angulargrid

Added agPerformantScroll options, if enabled non visible element (from viewport) will be removed, and there watchers will be disabled.

If I get the time, I might check their logic and see if I can implement it into Wookmark.

@shubham-gupta-xelp
Copy link

Any update on this?

@Sebobo Sebobo removed their assignment May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants