QGraphicsScene - memory consumption
Hello
I want to create mobile program to display OpenStreetMap or similar (tiled) maps - something very like LightMaps demo. I consider using QGraphicsScene to display tiles. However I wonder: user can possibly load millions of 256x256 pixmaps on multiple layers (z-axis), first in one area of the scene, later in other. I worry about limited memory on smartphone. How should I address this problem? Or should I better create ordinary QWidget (as LightMaps)?
Re: QGraphicsScene - memory consumption
Whatever path you choose you will have to manage the memory yourself by removing the tiles that are not currently displayed from memory. You can cache the data on a permanent storage device to fetch it quickly when you need it.
Re: QGraphicsScene - memory consumption
Thank you for your answer.
I was told QGraphicsScene does some rendering optimizations (and I don't know this part of API yet), so I'll try it out.
Re: QGraphicsScene - memory consumption
Quote:
Originally Posted by
mateuszzz88
I was told QGraphicsScene does some rendering optimizations (and I don't know this part of API yet), so I'll try it out.
Yes, at a cost of increased memory consumption.