Skip to content

Add virtual scrolling #8533

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

Merged
merged 1 commit into from
Apr 2, 2025
Merged

Conversation

egbertbouman
Copy link
Member

Fixes #8365.
Fixes #8492 by removing the need for pagination.

This PR adds virtual scrolling to all tables, including file trees. For lists of a couple of thousand items, the difference is quite dramatic. Before you could barely scroll, now there's no slowdown at all. I've tested with up to 100k items without any issues. I think/hope it's good enough to disable pagination.

A downside is that column sizes can change as you scroll through the list. That's just because the table layout is set to auto, and only a small set of rows is being rendered at a time. I didn't want to go into calculating column sizes manually, but we can always revisit this later.

Note that there is room for additional performance improvements by only requesting updates from the core for the items that are (close to being) visible. Maybe something to consider in the future.

@egbertbouman
Copy link
Member Author

validate

@egbertbouman egbertbouman marked this pull request as ready for review April 2, 2025 12:25
Copy link
Contributor

@qstokkink qstokkink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍 This fully obsoletes the TorrentFileTree now then, I think.

@egbertbouman
Copy link
Member Author

Thanks! I wasn't brave enough to remove TorrentFileTree, as some people may prefer it.
It's also the normal way of displaying files (I think that e.g., QBittorrent uses trees too).

@egbertbouman egbertbouman merged commit 8580558 into Tribler:main Apr 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Enable Pagination "Disable Pagination", causes severe slowdown/ unresponsive behaviour
2 participants