Re: Oysi's 3D Rendering & Physics Engine
Posted: Mon May 26, 2014 10:35 pm
I like my jaw on the ground.
You could experiment with calling [manual]collectgarbage[/manual] every frame.Jasoco wrote:Is there anything I can do to stop it happening like that? It causes noticeable framerate lag when it happens.bartbes wrote:Garbage collection, perhaps?
Unfortunately that ends up lowering the framerate drastically. Where I get mostly 95% smooth framerate before, it drops the overall FPS to 20-30.Robin wrote:You could experiment with calling [manual]collectgarbage[/manual] every frame.Jasoco wrote:Is there anything I can do to stop it happening like that? It causes noticeable framerate lag when it happens.bartbes wrote:Garbage collection, perhaps?
I may be 100% wrong here, but from my understanding the garbagecollector runs every now and then regardless of any dirty varaibles. the lag might not be from an unused reference/table, but instead simply because the garbagecollector is searching through the global space looking for unused stuff - whether or not there actually is any.Jasoco wrote:Unfortunately that ends up lowering the framerate drastically. Where I get mostly 95% smooth framerate before, it drops the overall FPS to 20-30.Robin wrote:You could experiment with calling [manual]collectgarbage[/manual] every frame.Jasoco wrote: Is there anything I can do to stop it happening like that? It causes noticeable framerate lag when it happens.
Edit: I tried putting it on a cron timer and it still still slowed it down. I really need to figure out what it's cleaning up and why it's constantly creating it. Something is dirtying up the global space. Probably my old crappy coding methods.
Alas I just tried this and it ends up crashing (Stopping abruptly) the game after a few seconds on large worlds if I don't step, and slowing it down immensely if I do step.Robin wrote:I don't know anything about this, but you could try pausing the garbage collector at startup and only do a step each frame, if you haven't already.
Could a Mod split this then?Oysi wrote:Let's keep the thread on topic, shall we? You can make a separate thread about that heartbeat thing.