divamgupta / divamgupta/diffusionbee-stable-diffusion-ui
History tab uses >100% RAM for large histories
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 727
- PR merge metrics
- No merged PRs in 30d
Description

The History page's performance scales relative to its size. The more History items you have, the harder it is to load the page.
I have 1,500 entries right now. The History page completely maxes out memory usage on my M1 MBP, going into swap, even as the app is completely idle. In that screenshot above I am using the app for a while before clicking History.
_That level of memory usage remains_, however. Even after clicking to other tabs, it does not reduce.
I'm not as familiar with Vue, but in React this sort of memory pressure can be caused by expensive-to-render components that render over and over again in a loop. This may also be stemming from trying to render every single line in the history page all at once.
**Replication**
1. Pre-fill DiffusionBee history, `~/.diffusionbee/data.json`, with 10,000 fake entries
2. Visit History tab in app
**Possible fixes**
* Use virtualized scrolling to only render items in view: https://github.com/tangbc/vue-virtual-scroll-list, https://github.com/TanStack/virtual, etc.
* Check Chrome Developer Tools to see if components are rendering in a loop
(I originally thought this was a v1.2.0 issue, but I have confirmed it is present on v1.1.0)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.