Hi,
 thank you. I've keep working a bit on it. The airport ctor doesnt need to
init the vector<xways>, it's wasteful.
Now it saves a few megabytes by removing unneeded parts from FGRunways
(400k+ constructed) and using some string& instead of string copies.
By using those changes and also by using reduced precision on FGRunway
members (double for length?) i was able to reduce sizeof(FGRunway)(win32)
from 256 to 192.

 One big contributor to size is SGAtomic. On windows it's 32 bytes for a 4
byte counter. That makes SGReferenced 32 bytes, too, for an 8 bytes payload.
After reading the docs on InterlockedIncrement (they say a 4 byte align is
necessary) I tried recompiling with SGAtomic aligned on 4 bytes, but i got
some quite obscure crashes inside ntsomething.dll called from malloc. Anyone
knows why we need to align to 32 bytes (x86's cache line) and not 4 bytes as
suggested by the docs?

Thanks again, attached is a patch for the patch. May I ask for your patch?

greetings,
 yon


On Thu, Dec 4, 2008 at 2:38 AM, James Turner <[EMAIL PROTECTED]> wrote:

>
> On 1 Dec 2008, at 18:20, James Turner wrote:
>
> > I will apply and test, sadly I am in the same situation as you for
> > getting patches applied :)
>
> I've tested the apt loader / string split / patch, and everything
> seems to work - though I've complicated things by refactoring the
> runway / taxiway creation, to fix some style issues, and resolve  a
> couple of problems: taxiways don't need a reciprocal created (and it's
> wasteful to do so), and runways weren't getting their airport set,
> which crashed some local code of mine.
>
> Regards,
> James
>
>

Attachment: perf2.patch.gz
Description: GNU Zip compressed data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to