Drape and memory consumption

classic Classic list List threaded Threaded
3 messages Options
JD JD
Reply | Threaded
Open this post in threaded view
|

Drape and memory consumption

Hi,

I am trying to optimize globaly the performance of our OsgEarth based application.
During tests, I observed a big difference on memory consumption depending on the rendering technic.

Here is the test:
- OsgEarth version is 2.8 tag
- Fill a earth file to only display one big shape file (world boundaries from natural earth at 10m precision) using feature_geom driver
-> memory consumption in case of "drape" is 255 MB
-> memory consumption in case of "map" is 161 MB

I understand that the drape technic is using a texture (4096 in my case) and a RTT pass.
However, I don't really understand why the memory takes 100 MB more when using drape technic (the "mesh" sould be present only once in the memory)

Any reasons? is it an issue?
If not, is there a work around for decreasing memory concumption in this kind of situation?

Thank you,
Jérôme.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Drape and memory consumption

Hi Jerome,

A 4096 RTT texture takes up 64MB of memory;  I did a quick test with the default 2048 size and saw my memory footprint go up about 24MB (expected 16MB from the texture). So, there is some extra memory usage happening; not sure yet why that is.
Glenn Waldron / Pelican Mapping
JD JD
Reply | Threaded
Open this post in threaded view
|

Re: Drape and memory consumption

Thank you Glenn and happy new year!

When using a 4096 I have 100MB of extra memory (while expecting 64MB). It is a big difference.
The earth file is:

<map name="Dynamo" type="geocentric" version="2">
 
 
    <options overlay_texture_size     = "4096">
    </options>
   
 
    <annotations>
 
        <circle name="draped circle">
            <position lat="34.051" long="-117.974"/>
            <radius value="50" units="km"/>
            <style type="text/css"> fill: #ffff0080; stroke: #ffffff; stroke-width: 2px; altitude-clamping: terrain-drape; </style>        </circle>
 
    </annotations>
</map>

Changing terrain-drape by terrain-scene decreases the memory from 190 to 90 MB.

I tried to search in code some per-camera data but did not find something interesting (the screenspacelayout uses per camera data but it is not applicable in this example).

Also, is there a way to improve the initial consumption (an empty map is consuming 90MB) ?

Thank you,
Jérôme.