×

Discussion Board

Results 1 to 11 of 11

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    138

    QtWebkit + api.maps.ovi.com + out of memory

    Hello,

    we are using api.maps.ovi.com for showing a dynamic map on webpage. I have realized that webkit consumes PLENTY of RAM. Only map opening will consume 14Mb of memory. Also, map browsing will consume LOTS of RAM.

    I have not found a way how stop memory consuming when you browse map. It consumes memory every time you must download new titles. At some point you run out of memory.

    I have tried following code to not cache map titles in RAM. Didn't help. Any other ideas?

    QWebView *webview = new QWebView(this);

    webview->settings()->setMaximumPagesInCache(0);
    webview->settings()->setOfflineStorageDefaultQuota(0);
    webview->settings()->setObjectCacheCapacities(0,0,0);
    webview->settings()->setOfflineWebApplicationCacheQuota(0);

    Regards,
    FoL

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QtWebkit + api.maps.ovi.com + out of memory

    Have you increased (substantially) the size of your heap? The default heap size is from another era and is woefully small for "modern" applications.

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    138

    Re: QtWebkit + api.maps.ovi.com + out of memory

    Quote Originally Posted by danhicksbyron View Post
    Have you increased (substantially) the size of your heap? The default heap size is from another era and is woefully small for "modern" applications.
    Yes I have. It is 32Mb.

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: QtWebkit + api.maps.ovi.com + out of memory

    Hi, first 32MB ain't lot when it comes to QtWebkit.
    I haven't used ovi.maps but as it uses (or least I make a good assumption) javascript to load the tiles they would be bound to JSObjects and thus tiles are subject to garbage collection. So, what happens if you force garbage collection e.g with timer?
    Do you know if you run OOM or GOOM (Out of Graphics memory) ? GOOM even happens only on Symbian^3 based devices.
    There is a lot of extra copying around with the images esp. if using Symbian^3 :S It has already been greatly reduced but even with QtWebkit2.1 it consumes quite a bit of memory.

    EDIT:
    Also note that if using later QtWebkit and Qt Javascript virtual machine is running on it's own heap and images are store on their own heap. This means increasing epocheapsize has no effect.
    Last edited by jakoskin; 2011-03-18 at 05:07.
    http://twitter.com/#!/koshui

  5. #5
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    138

    Re: QtWebkit + api.maps.ovi.com + out of memory

    I have used perfmon for tracing RAM. It runs out of RAM (125Mb -> 90Mb -> out of memory).

    How do you force garbage collection?

    How do I know if I am using later QtWebkit and Qt Javascript?

    Regards,
    FoL

    Quote Originally Posted by jakoskin View Post
    Hi, first 32MB ain't lot when it comes to QtWebkit.
    I haven't used ovi.maps but as it uses (or least I make a good assumption) javascript to load the tiles they would be bound to JSObjects and thus tiles are subject to garbage collection. So, what happens if you force garbage collection e.g with timer?
    Do you know if you run OOM or GOOM (Out of Graphics memory) ? GOOM even happens only on Symbian^3 based devices.
    There is a lot of extra copying around with the images esp. if using Symbian^3 :S It has already been greatly reduced but even with QtWebkit2.1 it consumes quite a bit of memory.

    EDIT:
    Also note that if using later QtWebkit and Qt Javascript virtual machine is running on it's own heap and images are store on their own heap. This means increasing epocheapsize has no effect.

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: QtWebkit + api.maps.ovi.com + out of memory

    Quote Originally Posted by forceoflight View Post
    I have used perfmon for tracing RAM. It runs out of RAM (125Mb -> 90Mb -> out of memory).

    How do you force garbage collection?

    How do I know if I am using later QtWebkit and Qt Javascript?

    Regards,
    FoL
    So you run out of that 32MB. to force garbage collector you can call CollectGarbage() from javascript.
    If you can control your code you can delete single items as well. Here is some guidelines http://developer.apple.com/library/s.../Advanced.html .

    Do you use Qt 4.7.2 and running on Symbian^3 ? and did you install separate QtWebkit.sis from the dir? if yes,yes and yes then you are using latest available to Symbian without building QtWebkit yourself.
    http://twitter.com/#!/koshui

Similar Threads

  1. Cost of OVI Maps API
    By fxl in forum Symbian
    Replies: 4
    Last Post: 2011-06-09, 13:02
  2. Ovi Maps API question
    By mantoben in forum [Archived] Qt Mobility Project
    Replies: 5
    Last Post: 2011-03-03, 04:08
  3. OVI Maps 3 - Size of Maps-Data
    By BeSt in forum General Development Questions
    Replies: 3
    Last Post: 2010-02-06, 14:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×