codyswanner / Meme-Cataloger

Learning ReactJS and Django while building something that I want to use
1 stars 1 forks source link

Pagination/Virtualization #98

Closed codyswanner closed 1 month ago

codyswanner commented 1 month ago

Implement either pagination or virtualization/infinite scroll to improve loading times once many images are uploaded. This project needs to be able to handle thousands (tens of 1000s is in scope, 100,000+ is not out of the question) of images per user, and the page still needs to be able to load quickly. The database should be able to quickly handle filtering, but the page needs to be able to render the most relevant results quickly and still feel responsive.

codyswanner commented 1 month ago

Virtualization is preferable -- pagination is a clunky user experience, and the problem with infinite scroll without virtualization is that previously viewed elements (that have scrolled off the screen) stay loaded after they are no longer visible, which is solved with virtualization. react-window is recommended by MUI, but may not be full-featured enough for this use case. react-virtualized seems to be a little more full-featured, if much larger as a package (I'm not too concerned with package size). There may be some other options as well, but these seem to be the most widely talked about.

codyswanner commented 1 month ago

Going with react-virtuoso on this, see 1fd0f71