Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-11 Thread Anders Gidenstam
On Sun, 10 Apr 2011, Arnt Karlsen wrote: On Sun, Apr 10, 2011 at 2:15 PM, Anders Gidenstam wrote: The small changes needed to add a separate GC thread are available here: http://www.gidenstam.org/FlightGear/misc/test/sg-gc-2.diff http://www.gidenstam.org/FlightGear/misc/test/fg-gc-1.diff

Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-11 Thread Robert
In the case of nasal, I believe the garbage collection pass must be done in a single atomic step, otherwise it would leave the heap in an inconsistent state and adversely affect the scripts. I completely agree with you. Now I understand the whole thing much better. I originally thought about

[Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-10 Thread Robert
As discussed in Stuttering at 1 Hz rate we now know that regular and unpleasant stuttering is caused by Nasals garbage collector. So I thought about possibilities to improve it. What if we could decouple the following function as a separate thread, so that it runs *asynchronously* from the main

Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-10 Thread Curtis Olson
On Sun, Apr 10, 2011 at 1:43 PM, Robert wrote: As discussed in Stuttering at 1 Hz rate we now know that regular and unpleasant stuttering is caused by Nasals garbage collector. So I thought about possibilities to improve it. What if we could decouple the following function as a separate

Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-10 Thread Anders Gidenstam
On Sun, 10 Apr 2011, Curtis Olson wrote: I'm not an expert in nasal garbage collection, but I think the problem is that garbage collection is not something we can divide up into chunks (which is essentially what threading would do.) In addition, threading adds a lot of potential order

Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-10 Thread Curtis Olson
Just for the record, I would be pretty strongly opposed to adding a thread for no particular benefit. In fact I think the threshold of gained benefit needs to be pretty high to add another thread to the code. Threads might seem simple at first, but they can hide nasty bugs that are almost

Re: [Flightgear-devel] Nasal Garbage Collector (was Stuttering at 1 Hz rate)

2011-04-10 Thread Arnt Karlsen
On Sun, 10 Apr 2011 15:03:47 -0500, Curtis wrote in message BANLkTi=4NOqL3gOuagCYkBV==9v504v...@mail.gmail.com: Just for the record, I would be pretty strongly opposed to adding a thread for no particular benefit. In fact I think the threshold of gained benefit needs to be pretty high to add