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

Tree and Table widgets refresh full content on any scroll or resize #5456

Closed
2 tasks done
dweymouth opened this issue Jan 24, 2025 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster

Comments

@dweymouth
Copy link
Contributor

dweymouth commented Jan 24, 2025

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

The Tree and Table widgets currently refresh the entire contents whenever they are scrolled or resized, regardless of whether new elements appear in the viewport or not. This is inefficient, though with the 2.5.x driver implementation it was not severe enough to be a bottleneck at least on modern systems. But with #5422, where we are currently processing scroll / mouse drag events from the OS as fast as they arrive, it causes severe lagging when scrolling or resizing a Tree or Table (visible in fyne demo). This does not happen with List, which has been optimized to only refresh the necessary rows.

How to reproduce

Run fyne_demo on the #5422 branch. Scroll the tree or table, on a Macbook with the trackpad (which seems to deliver scroll events much faster than 60 fps), or resize the split container containing the Tree, also with the Macbook trackpad.

Screenshots

No response

Example code

fyne_demo

Fyne version

develop

Go compiler version

n/a

Operating system and version

MacOS

Additional Information

No response

@dweymouth dweymouth added the optimization Tickets that could help Fyne apps run faster label Jan 24, 2025
@dweymouth dweymouth changed the title Tree widget refreshes full content on any scroll or resize Tree and Table widgets refresh full content on any scroll or resize Jan 24, 2025
@Jacalz Jacalz added the bug Something isn't working label Jan 24, 2025
@andydotxyz
Copy link
Member

I am pretty sure this is down to Scroll.Resize() calling Refresh() on the content, when really it should just update the sliders etc. I have a local patch for this which I will shape up into a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster
Projects
None yet
Development

No branches or pull requests

3 participants