Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Memory utilization issue
sreeji last edited by
I have installed Qt Creator and created a project which will show huge amount of data in a QTableWidget. And now I have some issue with the memory usage. My project using larger amount of RAM (~2 GB) when its showing table data. Nearly 14 lakh rows are there and each row has 8 columns.
When I searched about issue in internet I found that Qt5 is utilizing more memory compared to older version (Qt4.8.5) when we are using huge amount of data.
The above link explains the problem, and I wanted to know why its happening like this and what is the solution for this.
Whether the issue is solved in newer version of qt(Qt5.9)?.
6thC last edited by 6thC
Having only started using Qt around 5 - I can't commend on any performance regressions but 1.4million elements x8 seems a lot for a QML model to store... do you have an example for others to help further.
I'm not sure if you are doing either so I can assume maybe a bunch of insert/removes? In that case as I've found with charts - replacing the whole vector in one hit (when I need to do whole set updates) is much much quicker that in a range loop.
I suspect my case is because this is only one signal vs a signal each change if I did individual updates... that one change made an unworkable application with 500ms per update to ~0ms allowing me to run at a high refresh rate again.
I've found the QML frontend an inadequate data storage system... not to mention that's a lot of work for your gui thread.
I use C++ vectors (thinking database for the future) for that amount of data.
Hi and welcome to devnet,
When dealing with huge amount of data, it's usually best to create your own model to optimise as much as possible how the memory is used using for example a rolling window over your data rather than trying to show absolutely every row of data available.
As for the bug you link to, there's already a pretty complete discussion on the matter on it. And for the status of the performance, the simplest is to try it yourself with the latest version of Qt.