Hi guys,
I am planning to port an application in Qt3.3.6 to Qt4.2.
I have to check the memory usage in Qt4.2.
So created a canvas with 100k rects and millions of lines.
Custom rect class is derived from QPolygonalItem
and Line from QCanvasItem.(Qt3.3.6).
Initially in Qt4.2 i used the convinience QGraphicsRect and QGraphicsLine classes ,But the amount of memory consumed was almost same as that in Qt3.3.6.(approx 1.2g)
Since double type is used to store the co-ordinates in QGraphicsLine and QGraphicsRect.I just copied their implementation and changed the type of co-ordinates to int.
After that Memory usage was reduced to 50%.
guys y does Qt4.2 consumes less memory than Qt3.3.6. Is it the chunks concept in Qt3.3.6 that comes in to picture here??
Thanks .
Bookmarks