How can I make a QT app displaying very large amount of data with low memory usage?

218 Views Asked by At

(it's a Sysinternal's-Process-Monitor-like system monitor program based on QT 5.7.0 which could monitor and record most behaviors of process in the system.

program view

enter image description here

memory usage

enter image description here

As you can see it cost 100MB+ memory when there are 30000+ events recorded. and the memory usage could be easily increased to 1.0GB, even 2.0GB when there are more events, that's unacceptable in low performance machine. shall I save these events in sql database?

I use a QTableView with a custom model inherit from QAbstractTableModel attached to it, which displays only visible items. the memory issue is not caused by UI, since it cost so much memory even if I remove the tableview.

0

There are 0 best solutions below