395
edits
(→August 14: going through 700k of logs) |
Philosopher (talk | contribs) (→GC Issue: Too Many Objects!: new section) |
||
| Line 109: | Line 109: | ||
—[[User:Hooray|Hooray]] | —[[User:Hooray|Hooray]] | ||
== GC Issue: Too Many Objects! == | |||
Looking at Garbage collector stats in the logging output from FlightGear, there's a lot of GC'ing happening when loading scripts, which is okay. Essentially my (console-based) measure of “starting” the simulator that I see is when I see “Animated jetways ... initialized” message. Environment init happens somewhere in the middle, and test.nas in between those two subsystems. In both a “normal” and a “extended-nasal” (maybe it’s Extreme Nasal by now?) run, the environment init message is printed between GC reference counts of 26000-31000 (I saw +2000 extra objects for the run with test.nas compared to the normal one). In a test.nas run, the number of GC-findable objects keeps climbing from after I see “Start thread” and “End thread” messages. At the animated jetways init (after test.nas) I see 30340 versus 703425 objects (¡that's a factor of over 20!). In a normal session, the object count might keep going up until 43000, and then it drops off to 15000 and stays there for the rest of the session (15049 +- 20 or so). In an example test.nas session it got to 5268045 objects and an astounding 10645602 references (>1e7!) before I killed it off (couldn't bare to watch…). At that point, all of the worker threads were done, so it's not like they could be clinging to lost objects; and I'm not storing an infinitely-growing list anywhere, I'm even freeing the sub-contexts as they return! Since I know the Nasal code fairly well, is it possible that I'm creating leaks in the C code? But it is basically under the same automatic memory management, so I would think that it is unlikely. I will have to go a dump sizes of objects sometime, and perhaps whole namespaces, so that I can check if there's something that I'm forgetting to free. (Wait, I thought it was Nasal, we aren't supposed to worry about memory — wink.) Any thoughts? [[User:Philosopher|—Philosopher]] ([[User talk:Philosopher|talk]]) 21:02, 14 August 2013 (UTC) | |||
edits