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

pagination for tags #56

Open
bart-d opened this issue May 21, 2020 · 5 comments
Open

pagination for tags #56

bart-d opened this issue May 21, 2020 · 5 comments

Comments

@bart-d
Copy link
Contributor

bart-d commented May 21, 2020

some tags are used thousands of time like "hidden text" for example. these slow down the tag page when you try to look them up. we need to either limit the output or use pagination/infinite scroll for these searches with a lot of results.

@lordscarlet
Copy link

It seems like we should have this for search in general. I keep meaning to ask you, "Why is it limited to 100 results?" then I notice the dropdown to expand the results.. but if its more than 500, what do I do then? (or does it know and keeps expanding the dropdown?)

@bart-d
Copy link
Contributor Author

bart-d commented May 22, 2020

I'm somewhat obsessed with speed and responsiveness, i will always test for performance when i add something and this also what happened with the search results, when i introduced the search i wanted to prevent ever loading results when someone would search for something very common like extension=ans for example :) i didn't think searches beyond 500 results would be useful because who would scroll this far i results, it's like Google page 3 that is never reached :)

for tags it's a different matter though, as there is not limit on the amount of tags. and i ran in a similar issues with the artists page because there are a few artists that did output an crazy amount of artworks that would make their page load too long (after a few seconds i lose patience.. and visitors lose interest) :) so on that page i added infinite scroll, the page loads fast, because it will only load more when you scroll down, you'll see the scrollbar jump when more content gets added, try an artist page like this to see it:

https://16colo.rs/artist/enzo

if you grab the scrollbar and go immediately to the bottom, you can see the actual loading of the content and this is the downside of this solution.

@lordscarlet
Copy link

Is the performance issue in the data that is returned, or in the query itself? Is tehre any reason you have to load everything and can't load each page from the database as someone pages?

@bart-d
Copy link
Contributor Author

bart-d commented May 22, 2020

I try to keep my queries under 30ms, the performance doesn't tend to be limited by the server. It's usually the client that is slow to render or to fetch (many) resources (often images in this case). Clients being browsers on desktop but also on much slower mobile devices.

Pages could be an alternative, till now I tried to avoid those because scrolling is more comfortable on mobile devices (40% of all visitors)

@lordscarlet
Copy link

Yeah, I am always torn on infinite scrolling. Could also potentially infinite scroll up to x number of records.

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

No branches or pull requests

2 participants