-
Notifications
You must be signed in to change notification settings - Fork 711
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
- Pre-fill DiffusionBee history,
~/.diffusionbee/data.json, with 10,000 fake entries - 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)
