Results 1 to 4 of 4

Thread: QGraphicsScene - memory consumption

  1. #1
    Join Date
    Nov 2010
    Posts
    9
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default 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)?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2010
    Posts
    9
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default 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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGraphicsScene - memory consumption

    Quote Originally Posted by mateuszzz88 View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTreeView memory consumption
    By eyeofhell in forum Qt Programming
    Replies: 6
    Last Post: 19th November 2010, 01:04
  2. QSqlQueryModel and memory consumption
    By lunatic fringe in forum Qt Programming
    Replies: 3
    Last Post: 5th February 2010, 11:09
  3. QTableView memory consumption
    By LordQt in forum Qt Programming
    Replies: 7
    Last Post: 9th December 2008, 16:51
  4. Pixmap memory consumption
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 29th November 2007, 15:35
  5. Tracking memory consumption of plugins.
    By spud in forum General Programming
    Replies: 3
    Last Post: 7th September 2007, 13:14

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.