Re: [Flightgear-devel] Nasal performance

2012-06-07 Thread Heiko Schulz
Thorsten, Heiko and Vivian, please try the following version and let me know if this improves anything. If possible, do all tests with the weather tile type 'Test' (that has no randomness in the cloud configuration selection, so it delivers a fairly reproducable situation in terms of cloud

Re: [Flightgear-devel] Nasal performance

2012-05-23 Thread Erik Hofman
On Tue, 2012-05-22 at 13:00 -0700, Andy Ross wrote: I was lucky enough to notice this come by. I wouldn't hold your breath. :) Hi Andy, how's life? I did already search for a new release of Nasal on your site but I believe flightgear already uses the latest version. Erik

Re: [Flightgear-devel] Nasal performance

2012-05-23 Thread Stefan Seifert
On Tuesday 22 May 2012 13:04:24 Andy Ross wrote: On 05/20/2012 11:37 AM, Stefan Seifert wrote: Generational garbage collection is not that difficult. When you have a working mark sweep GC, extending it to be generational is rather straight forward and can greatly reduce GC runtime

Re: [Flightgear-devel] Nasal performance

2012-05-23 Thread Andy Ross
On 05/23/2012 12:04 AM, Erik Hofman wrote: Hi Andy, how's life? I did already search for a new release of Nasal on your site but I believe flightgear already uses the latest version. The most recent code (except for a few modules that were never imported) is in SimGear. I threw my copy up on

Re: [Flightgear-devel] Nasal performance

2012-05-23 Thread Anders Gidenstam
On Wed, 23 May 2012, Stefan Seifert wrote: Maybe even simpler: run the GC in a separate thread. Threaded GC usually is quite tricky but in this case it may not be that much of a problem. Is there any time during processing a new frame when no Nasal is run but something else which is time

Re: [Flightgear-devel] Nasal performance

2012-05-22 Thread Vivian Meazza
Thorsten (Even if this works fine, please do not commit yet, I am not 100% sure that I didn't create an instability somewhere). Turns out I broke at least the visibility interpolation - to restore it, uncomment line 726 in Nasal/local_weather/local_weather.nas if (vis 0.0)

Re: [Flightgear-devel] Nasal performance

2012-05-22 Thread Renk Thorsten
I have tested using only the test tile so far. The time spent in events is dramatically reduced to around 70ms vice 210ms. There remains some odd cyclical frames coming in, but the results are broadly in line with Basic Weather. Okay, that's good news. I'll continue working along these

Re: [Flightgear-devel] Nasal performance

2012-05-22 Thread Andy Ross
On 05/20/2012 10:17 AM, James Turner wrote: This is interesting - as far as I know, the current GC does not include a maximum delay and restart facility. If it did, that would entirely satisfy the current issues. At least by my understanding. Equally, I've looked at the current GC code and

Re: [Flightgear-devel] Nasal performance

2012-05-22 Thread Andy Ross
On 05/20/2012 11:37 AM, Stefan Seifert wrote: Generational garbage collection is not that difficult. When you have a working mark sweep GC, extending it to be generational is rather straight forward and can greatly reduce GC runtime Runtime, yes, but not latency bounds. You still have to

Re: [Flightgear-devel] Nasal performance

2012-05-22 Thread Vivian Meazza
Thorsten I have tested using only the test tile so far. The time spent in events is dramatically reduced to around 70ms vice 210ms. There remains some odd cyclical frames coming in, but the results are broadly in line with Basic Weather. Okay, that's good news. I'll continue working

Re: [Flightgear-devel] Nasal performance

2012-05-21 Thread Renk Thorsten
Not that we're there yet Heiko and Vivian, please try the following version and let me know if this improves anything. If possible, do all tests with the weather tile type 'Test' (that has no randomness in the cloud configuration selection, so it delivers a fairly reproducable situation in

Re: [Flightgear-devel] Nasal performance

2012-05-21 Thread Vivian Meazza
Thorsten Not that we're there yet Heiko and Vivian, please try the following version and let me know if this improves anything. If possible, do all tests with the weather tile type 'Test' (that has no randomness in the cloud configuration selection, so it delivers a fairly reproducable

Re: [Flightgear-devel] Nasal performance

2012-05-21 Thread Renk Thorsten
(Even if this works fine, please do not commit yet, I am not 100% sure that I didn't create an instability somewhere). Turns out I broke at least the visibility interpolation - to restore it, uncomment line 726 in Nasal/local_weather/local_weather.nas if (vis 0.0)

[Flightgear-devel] Nasal performance

2012-05-20 Thread Renk Thorsten
88 declared but unused variables 47 declarations of the same or similar variables 427 instances of else if instead of elsif 100 instances of I = I + 1 instead of i+=1 Numerous examples of variables declared inside for loops, and some of those are inside other for loops Variables declared

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Erik Hofman
On Sun, 2012-05-20 at 10:43 +, Renk Thorsten wrote: Advanced Weather doesn't burn any significant performance inside Nasal - it burns the performance by calling hard-coded C++ functionality from Nasal. I hope you're not suggesting that C++ is always slower than Nasal? :-) Erik

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Pascal J. Bourguignon
Erik Hofman e...@ehofman.com writes: On Sun, 2012-05-20 at 10:43 +, Renk Thorsten wrote: Advanced Weather doesn't burn any significant performance inside Nasal - it burns the performance by calling hard-coded C++ functionality from Nasal. I hope you're not suggesting that C++ is always

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread syd adams
So, just to get this out of the way, some benchmark tests. As you have probably discovered by now, elseif isn't valid syntax and leads to a parse error, so my 427 instances of using it are trivial to justify :-) just a quick note to this interesting thread ... its elsif in nasal , not

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Renk Thorsten
just a quick note to this interesting thread ... its elsif in nasal , not elseif ... no e Thanks. That would explain it ;-) I hope you're not suggesting that C++ is always slower than Nasal? :-) Pascal summarized it nicely - we already have ported the important stuff to C++, so what remains

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Vivian Meazza
Thorsten just a quick note to this interesting thread ... its elsif in nasal , not elseif ... no e Thanks. That would explain it ;-) I hope you're not suggesting that C++ is always slower than Nasal? :-) Pascal summarized it nicely - we already have ported the important stuff to

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread James Turner
On 20 May 2012, at 17:59, Vivian Meazza vivian.mea...@lineone.net wrote: The current implementation is a simple mark/sweep collector, which should be acceptable for most applications. Future enhancements will include a return early capability for latency-critical applications. The collector

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Erik Hofman
On Sun, 2012-05-20 at 13:58 +, Renk Thorsten wrote: just a quick note to this interesting thread ... its elsif in nasal , not elseif ... no e Thanks. That would explain it ;-) I hope you're not suggesting that C++ is always slower than Nasal? :-) Pascal summarized it nicely - we

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Erik Hofman
On Sun, 2012-05-20 at 19:17 +0200, James Turner wrote: This is interesting - as far as I know, the current GC does not include a maximum delay and restart facility. If it did, that would entirely satisfy the current issues. At least by my understanding. Equally, I've looked at the

Re: [Flightgear-devel] Nasal performance

2012-05-20 Thread Stefan Seifert
On Sunday 20 May 2012 16:59:40 Vivian Meazza wrote: Andy also says of GC: Fancy items like generational collectors fail the small and simple criteria and are not likely to be included. Generational garbage collection is not that difficult. When you have a working mark sweep GC, extending