DerYeger / yeger

Monorepo for @yeger/ NPM packages
MIT License
302 stars 23 forks source link

In v-infinite-scroll, the browser becomes very laggy. #309

Closed xiaoxuwei12345 closed 3 weeks ago

xiaoxuwei12345 commented 1 month ago

Description

I want to use @ yeger/vue masonry wall in v-infinite-scroll, but I find that after scrolling a few pages, the browser becomes very laggy. Does @ yeger/vue masonry wall not support use in v-infinite-scroll?

Solution

No response

Additional context

No response

Preferences

DerYeger commented 1 month ago

@yeger/vue-masonry-wall is not designed to support any specific other library. I haven't worked with v-infinite-scroll myself, but if it's constantly resizing the container of the masonry component or changing/adding new items the performance will degrade. This could occur when v-infinite-scroll triggers the fetching of new items unexpectedly during the rerender of the masonry wall (because that requires recreating all elements, thus making the wall empty for a single Vue-tick).

xiaoxuwei12345 commented 1 month ago

Thank you for your reply! When I use v-infinity scroll, when the element content increases to around 200, it will be very slow (every time 30 new elements are added, the page will freeze for more than 3 seconds). I think infinite scrolling is a very common requirement when using MasonryWall (or other similar Masonry or Grid components). What library do you recommend combining MasonryWall with for infinite scrolling? thank you!

DerYeger commented 1 month ago

I can’t recommend a specific library, since I haven’t had that use case myself.

github-actions[bot] commented 3 weeks ago

This issue has been marked stale because there was no activity for 21 days. Without further action, it will be closed in 3 days.