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

Unbounded internal cache sizes can lead to unbounded RAM use #5486

Open
2 tasks done
dweymouth opened this issue Jan 31, 2025 · 0 comments
Open
2 tasks done

Unbounded internal cache sizes can lead to unbounded RAM use #5486

dweymouth opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster

Comments

@dweymouth
Copy link
Contributor

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

Internal caches are currently unlimited in size, and are cleaned out on a fixed 1-minute schedule. This means that within a minute, apps can grow in RAM use unboundedly, possibly leading to out of memory errors, if they create a huge number of cached objects (especially text textures) within that time. For example, scrolling quickly through 10s of thousands of text-heavy list rows (which could contain on the order of 10 canvas.Texts each).

Possible ideas are to take inspiration from the Go GC itself - run our clean tasks more frequently based on use patterns, and have a "soft limit" on cache size which is based on the past patterns of use.

How to reproduce

scroll through many many rows of a text-heavy collection widget (eg extend the list or table in fyne_demo to be a million rows long)

Screenshots

No response

Example code

fyne_demo

Fyne version

develop

Go compiler version

n/a

Operating system and version

n/a

Additional Information

No response

@dweymouth dweymouth added bug Something isn't working optimization Tickets that could help Fyne apps run faster labels Jan 31, 2025
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

1 participant