Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-27 Thread Stuart Buchanan
On Sat, May 26, 2012 at 7:18 AM, Mathias Fröhlich wrote: Good morning, On Friday, May 25, 2012 19:48:32 Stuart Buchanan wrote: Thanks for taking a look. I think that the SGBuildingBin destructor will be called when I call the list clear() method on the SGBuldingBinList (SGBuildingBin.cxx

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-26 Thread Mathias Fröhlich
Good morning, On Friday, May 25, 2012 19:48:32 Stuart Buchanan wrote: Thanks for taking a look. I think that the SGBuildingBin destructor will be called when I call the list clear() method on the SGBuldingBinList (SGBuildingBin.cxx line 654). That in turn calls clear() I have no current

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-25 Thread Stuart Buchanan
On Thu, May 24, 2012 at 7:07 AM, Mathias Fröhlich wrote: I may be false since I really only spent *very* little time on that. But I believe you never free the content of the building bin list. That means the pointers stored in the list are gone, but the building bins - the pointees - are still

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-25 Thread Stuart Buchanan
On Wed, May 23, 2012 at 1:41 PM, Emilian Huminiuc wrote: All this ignores the fact that Stuart was actualy using the live weather hence we don't actualy know the visibility/ number of tiles loaded, that we don't know which way he was facing, the fact that in reality just 1/6 of the surface

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-24 Thread Mathias Fröhlich
Hi, On Wednesday, May 23, 2012 10:37:00 Stuart Buchanan wrote: So - Does anyone have any bright ideas on what I can do to reduce the base memory occupancy? One option might be to not generate the basement if the terrain is level. - Could a fresh pair of eyes take a look at the obj.cxx,

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-24 Thread scosu
Hi, I don't have any clue of the opengl and simgear based stuff, so I looked only at the struct Building and how to optimize that. In the attachment you can find 3 structs representing the data. The original is yours. 'small' is a very small optimization that doesn't require you to map floats to

[Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Stuart Buchanan
Hi All, Emilian and Vivian have pointed out a problem with the random buildings - they gobble memory. I'd like to get some advice on whether there's any solution, and also to ask someone with more C++ knowledge than myself to take a look at the code and check I'm not doing something stupid. The

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Renk Thorsten
Using the default random building density, the tiles that are loaded initially when sitting on the runway generates ~ 340k random buildings. We might be generating too many buildings then? The greater Los Angeles area has between 13 and 16 million inhabitants (dependent on what you count).

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Emilian Huminiuc
On Wednesday 23 May 2012 10:23:12 Renk Thorsten wrote: Using the default random building density, the tiles that are loaded initially when sitting on the runway generates ~ 340k random buildings. We might be generating too many buildings then? The greater Los Angeles area has between

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Stuart Buchanan
On Wed, May 23, 2012 at 11:54 AM, Emilian Huminiuc wrote: Besides being totally off topic, you can't do that direct comparison. I don't think it's off-topic. The parameters I've used for generating random buildings are somewhat a guess based on the densly populated regions of the UK First

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Stuart Buchanan
On Wed, May 23, 2012 at 11:23 AM, Renk Thorsten wrote: Using the default random building density,  the tiles that are loaded initially when sitting on the runway generates ~ 340k random buildings. We might be generating too many buildings then? The greater Los Angeles area has between 13

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Emilian Huminiuc
On Wednesday 23 May 2012 12:10:16 Stuart Buchanan wrote: Actualy the Geater LA + Inland Empire area should use more somewhat small buildings, as the overwhelming majority of the residential buildings in that area are individual houses, all the way E to San Bernardino. So, are these

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Renk Thorsten
Besides being totally off topic, you can't do that direct comparison. First off, our default scenery lacks a lot of detail in the urban area boundaries in that area thus marking a far larger area as being urban - a far larger area on which to generate buildings That'd makes my point

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Emilian Huminiuc
On Wednesday 23 May 2012 14:16:02 Emilian Huminiuc wrote: So, are these areas defined as Urban, or Suburban/Town in our global scenery? -Stuart Just by looking at how the terrain is textured in FG, I can say they are defined as Urban. And the mapserver seems to agree with that

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Emilian Huminiuc
On Wednesday 23 May 2012 11:20:28 Renk Thorsten wrote: We're not talking a regionalized building placement concept here... we're doing an order of magnitude case study for our average US-themed city. * Thorsten No, I think you're extrapolating from a particularly bad case of mismatch

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Renk Thorsten
No, I think you're extrapolating from a particularly bad case of mismatch between reality and simulation. I wasn't talking about regionalized building placement, I was talking about bad landclass representation in that particular area, representation from which come the figures you used

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Emilian Huminiuc
On Wednesday 23 May 2012 12:05:05 Renk Thorsten wrote: No, I think you're extrapolating from a particularly bad case of mismatch between reality and simulation. I wasn't talking about regionalized building placement, I was talking about bad landclass representation in that particular

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Björn Kesten
Would trimming down building variety help? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Stuart Buchanan
On Wed, May 23, 2012 at 2:38 PM, Björn Kesten wrote: Would trimming down building variety help? Unfortunately not. Individual buildings aren't instantiations of a small number of objects, as the random vegetation is. Instead, a huge group of buildings are a single OSG object, which limits the

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Björn Kesten
In other words, object batching is imlemented and used. Good to know, thanks. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Frederic Bouvier
Hi Stuart, De: Stuart Buchanan On Wed, May 23, 2012 at 2:38 PM, Björn Kesten wrote: Would trimming down building variety help? Unfortunately not. Individual buildings aren't instantiations of a small number of objects, as the random vegetation is. Instead, a huge group of buildings

Re: [Flightgear-devel] Random Buildings - memory consumption

2012-05-23 Thread Martin Spott
Emilian Huminiuc wrote: http://mapserver.flightgear.org/map/?lon=-118.18562lat=33.91857zoom=11layers=0B00TFFFTFFFTFFF Just as a reminder the colour legend is here: http://wiki.osgeo.org/wiki/LandcoverDB_CS_Detail Cheers, Martin. -- Unix _IS_ user friendly - it's just