> The facts are:
>
> -it isn't that much important if you have 20fps or 60fps. But it is more  
> important that the framerates are   stable  !!!

It is for Vivian. We seem to agree that a stable 20 fps is possible (I get it 
and Vivian gets it if he throttles down), but he aims at more. Which is okay 
with me.

> In the moment I can see stutters which interrupts the simulation
> every <1-2 seconds for even about between one, two second. In this time  
> I always loose control about an aircraft and autopilot begins to play  
> crazy.

Well, I'm not seeing anything like that, and neither is Vivian - we were 
talking about frames delayed to 50-60 ms which are a noticeable stutter when 
you can run with 40 fps, not about second long delays. I agree that what you 
have way more serious and needs to be understood and fixed asap if that is 
possible.

So can you run the same diagnostics I suggested to Vivian, i.e. selectively 
disabling the list of loop flags and see if that improves anything? If I am not 
much mistaken, no major loop runs at a 1-2 second interval.

For reference: 
* effect volumes run per frame
* interpolation runs at 0.2 sec
* thermal and wave lift are usually of because not needed, but they run per 
frame
* housekeeping runs per frame
* tile management runs at 4.0 sec (but has very weak computational load)
* dynamics runs per frame
* quadtree runs per frame
* convective loop runs at 30 seconds, but isn't currently on

Two points worth noting: 1) most loops already run per frame, so we're really 
talking about if interpolation should be clocked faster or not and if running 
tile management at 4 seconds is a good idea and 2) it's rather unlikely that 
coincidence of not-per-frame loops creates what you experience because the 
timing doesn't work out.

Thus, starting from Vivian's theory that this is the problem gets us precisely 
nowhere I can see in your case (it may explain Vivian's findings though).

> Maybe I'm able to create a diagram showing Latency/Framerates in  
> Advanced Weather. Though my computer is not the newest one, I would  
> expect a much better behavior.

Me too.

> -Advanced weather is indeed a high fidelity weather simulation. Together  
> with the shaders, and especially lightfield shader, we get a very good  
> simulation of the atmosphere already, which is needed for a more  
> realistic simulation of flight.  So due to this it is clear that it  
> needs a bit more perfomance than other stuff in FGFS. But this doesn't  
> explain those stutters.

No, it doesn't. 

Look, believe me or not,  I am really trying to find out what the issues are. 
That's difficult, if the discussion boils down to 'I found a for-loop inside 
the main loop, that's probably what causes problems'. I put the for loop there 
for a reason having to do with thinking a few months about a difficult problem, 
I'm trying to explain these reasons so that we can get the biases out of the 
way and actually get down to identifying what needs to be addressed and what is 
red herring.

I'm also trying to be realistic - most people seem to be able to get a stable 
20 fps, i.e. worst frame delay of 50 ms (your case needs to be understood 
though), I might be able to improve the code to give a stable 30 fps, but I 
don't see it coming that tasks can be chopped and distributed such that you can 
expect a smooth 50 or 60 fps. 

> Here are people who does have enough experience and knowledge about  
> Project FlightGear and its codes and especially nasal which should be  
> taken seriously. 

If somebody posts a piece of code replacing something I have written and 
demonstrates that this runs faster, I take this very seriously. If somebody 
here suggests a faster algorithm to solve the problem, I take this very 
seriously (Stuart has outclassed my way of moving clouds by more than an order 
of magnitude - so we do it his way and deal with the secondary problems caused 
by the approximation. TorstenD has both advised me how to write loop structures 
across frames and done his version of the terrain sampling which is better than 
mine, so we use it now. There's a history of me adopting other people's 
solutions if they are demonstrated to be superior). 

On the other hand, 'This is bad design' or 'This should run faster' is cheap to 
say. Claiming that 'If you do it like this it would run faster' is also cheap - 
I've tested a few dozend strategies which fail already, and I know for a fact 
that what looks promising doesn't work automatically. I'll listen to such 
suggestions, but I reserve the right to dismiss them based on my experience 
with the problem at hand unless it is demonstrated to me that this actually 
works.

So if you, or Vivian, or anyone else can come up with code or an idea that 
actually fixes a problem, you'll see me say 'Thank you'.

> But I do see a wish by many developers and users to have both weathers  
> combined, and even more important working without any stutters. And this  
> means that some parts of your code maybe needs some overhaul.

As I said - I'm (for quite different reasons) much for hard-coding effects. I 
also said that I am going through the code and cutting line count down and 
trying to reduce the load on the GC. I'm not against a code overhaul - but I am 
against doing something when I don't share the diagnosis.

Coincidence of loops which don't run per frame can in my view not explain what 
you see. Even if I would have a for-loop in that would cause a 1 second delay, 
this would never occur at the intervals you're seeing. So I think it's a 
complete waste of time to start re-designing the loop structure based on the 
assumption that this causes your problems, it won't help you a bit. 

I want to really understand what is going on before starting a wild goose chase 
'fixing things' based on 'rules of thumb' like avoiding for loops at any cost. 
I think that is a legitimate strategy.

(As a side remark, I remember specifically asking here what people would like 
to see in a combined weather - so far no answers. )

* 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