ThorstenB

> On 11.05.2012 10:21, Renk Thorsten wrote:
> > The problem with that consequence is: As you switched all loops off,
> > the Nasal part of Advanced Weather ceased to run completely and all
> > that's left is the same cloud-generating functionality which is
> > responsible for Basic Weather (C++ and shader work). If killing all
> > Nasal did not solve the problems, then they can't be caused by Nasal,
> > and porting to C++ will not fix them.
> 
> Not quite true. A significant part of Nasal-related frame rate impact is
caused
> by garbage collection. Its delay/jitter only depends on the number of
Nasal
> objects and their references which need to be searched.
> Increasing the number of Nasal objects (code+data) existing in memory also
> increases the delay.
> 
> The amount of Nasal code which is actually being executed only influences
> the g/c frequency, i.e. whether the effect is visible every few seconds vs
> several times per second.
> 
> This is why we are loading large Nasal modules, like advanced weather, on
> demand only (= only when feature enabled). We're not unloading objects
> when disabling a feature though - this usually requires restarting fgfs.
This
> should be remembered when comparing such features (i.e. restart fgfs after
> disabling advanced weather etc).
> 

Thanks for that explanation. In the light of this I did some more testing.

Switching from Basic to Advanced Weather increases the time spent in the
events submodule from a stable 44 ms to over 1000 ms unstable. Setting all
flags to 0 reduces this to 90 ms. Switching back to Basic, the time drops to
75. 

Adding more nasal loops into the equation by lowering the flaps and gear  on
the Seahawk, I think I can see the effect as a slight increase in the time
spent in the events submodule.

I'm not clear how deleterious having one submodule taking significantly more
time than any other might be. If that is a problem, then large nasal script
are not a good idea even if we only enable them on demand. The instability
is clearly not a good thing, but is this a GC problem? If it is, then again,
large nasal scripts are not good. 

Perhaps James can fix the GC issue, and this issue will disappear. I hope
so.

Vivian 








------------------------------------------------------------------------------
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 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to