> Concorde has of the order of 6000 lines of active code, and yes, it  
> displays exactly the same discontinuities as Advanced Weather (approx. 10,000 
>  
> lines of code). So far, I have not found any other examples.

Just to idly continue my list - the A380 has in excess of 8000 lines of Nasal, 
the 777 has about 3500 lines, ... I don't know what you usually fly, but the 
modern, more complex aircraft tend to accumulate a lot of Nasal when aircraft 
makers start to care about systems.

I have just tried to start Flightgear without the Advanced Weather module 
loaded, disabling all weather, using the ufo to minimize any Nasal impact. The 
bottom line is, no matter what I do, as soon as I actually move around I always 
get spikes in the frame delay raging from 30 to 45 ms, i.e. I never have a 
smooth framerate even if I throw out basically everything.

So I can't ever get to the smooth state you apparently have on your system, 
which means I can't meaningfully test what makes a difference. I can only 
suggest that you try disabling the loops I suggested and play with the loop 
timings. If you think letting loops run per frame helps, by all means try - 
with the possible exception of the tile management, I'm fairly certain the rest 
can run per frame without bad side effects - the times are chosen to give the 
best performance on my system, but this may not work the same way for you. 

If you can find a working combination, I'll make it an option in the GUI and 
see if it helps others.

> Yes, I was around when Nasal was introduced to Flightgear. Up to now it's
> been a few 100s of lines, not many 1000s. We have long been aware that GC
> could cause problems, but haven't fixed it because the effects weren't  
> too bad while Nasal was small and framerates were low, and we had no obvious
> solution.

You know what really bugs me? The direction fingers are pointing.

We have an implementation of Nasal which dumps all the GC into a single frame 
and is apparently sensitive to the total amount of code, regardless if the code 
is actually run or not. This fact has historically not been widely advertized 
or explained. That turns out to be a problem.

The way this usually comes across is 'Advanced Weather causes stutter'. But it 
actually doesn't really (or at least that remains to be shown) - what causes 
stutter is mainly the GC, and Advanced Weather just happens to trigger this. 
The range of suggested solutions in the past included almost everything, from 
avoiding Nasal to porting code to Nasal to hacking around the problem to 
loading things on-demand - except fixing the actual cause of the problems.

I don't honestly know how complex code to collect garbage across many frames 
is, but somehow I doubt that in terms of man-hours the effort beats porting the 
existing large-scale Nasal codes to C++. Just my 2 cents in any case. 

Sorry, this really had to get out. Now, back to being constructive. As I said, 
I try to do what I can in terms of getting old code out and streamlining the 
rest - hopefully we get some improvements.

* Thorsten
------------------------------------------------------------------------------
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