View unanswered posts | View active topics It is currently Sat Jan 11, 2025 1:12 pm



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
 Garbage Collection 
Author Message
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Garbage Collection
This sounds terrific, and I look forward to seeing it implemented in a way that makes CC run better, but my inner skeptic is demanding to know what the downside might be to this. I cannot think of anything off the top of my head, but I'm not a very good coder, nor am I familiar with CC's Lua engine inner workings.


Tue Apr 20, 2010 4:34 am
Profile

Joined: Mon Apr 19, 2010 11:17 pm
Posts: 8
Reply with quote
Post Re: Garbage Collection
Okay, if chocolate isn't enough, then what would be? :-) The brain script is a fancy idea. Im pretty sure you'll have to call the script in the Brain code at some point, though. Is there any way you could implement this automatically in future versions of CC? Also, for certain lua scripts that you want to repeat themselves rapidly (within the ten seconds), it might be best add the garbagecollect to the function by hand, such as with the FBMs grow cursor. I had to tag on one other line on that so i could have multiple items grow at the same time. Otherwise, after a mere three, cc barfs on my keyboard. (i do enjoy chocolate though :))


Tue Apr 20, 2010 4:39 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Garbage Collection
Huh. That explains a lot. Be nice if this was handled by the lua wrapper or whatever in the next release.


Tue Apr 20, 2010 4:56 am
Profile WWW
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Garbage Collection
Kalidor, you are a ♥♥♥♥ genious.
Great to see that a way to plug the memory leak has been found :grin:


Tue Apr 20, 2010 9:51 am
Profile
User avatar

Joined: Tue Jan 12, 2010 8:25 pm
Posts: 400
Location: mukilteo, wa
Reply with quote
Post Re: Garbage Collection
I just tested it and WOW it really works... I played a insane death match that would have been super laggy or even crashed but it ran perfect.
There's not enough chocolate in the world for this.


Tue Apr 20, 2010 10:10 am
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Garbage Collection
OK idea here... BTW I'm loopy from meds so it may seem incoherent so ye be warned.

Water is impossible in CC b/c of the physics and lag and it would need Lua b/c it will need different physics. What if you made one, and had this garbage dump thing run every 100 or 200 ms? That would kill the Lua lag, and the only lag left would be from the amount of water the whatever is.


Tue Apr 20, 2010 9:51 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Garbage Collection
Put it into that water demo I made and see how much it reduces the lag. That doesn't have complex physics at all, but it still lags like anything.


Tue Apr 20, 2010 10:04 pm
Profile WWW
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Garbage Collection
Can you link me?


Tue Apr 20, 2010 10:05 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Garbage Collection
Whitty, this wouldn't really help with something like that.

Garbage collection is not magic; the reason a water mod won't work is because of the CPU demand, which garbage collection does nothing to reduce.

Garbage collection reduces memory bloat by removing isolated variables and old definitions of them. This means that for mods with lots of tables and sequential variables (TLB's computer) there's serious performance benefits because there's less memory strain.

It's not going to make the game run any faster. In fact, the more frequently garbage collection is done, the more load is placed on the processor.


Wed Apr 21, 2010 12:08 am
Profile
Loose Canon
User avatar

Joined: Sun Mar 29, 2009 11:07 pm
Posts: 2992
Location: --------------->
Reply with quote
Post Re: Garbage Collection
It works best on GIANT Lua mods, things that act in ways CC never dreamed of. If it's laggy because it checks every pixel and and particle, then deflects the close ones, it isn't going to become Un-laggy.


Wed Apr 21, 2010 12:56 am
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Garbage Collection
It doesn't even check every particle, just other water particles (in a global water table), and does deflection based on that. It's still pretty intensive for all intents and purposes though, but it shouldn't be. It's really not that many iterations, in programming terms, but I suppose that on top of the engine is what's killing it.
Regardless, garbage collection shouldn't help it much. You can try though.
viewtopic.php?f=61&t=18024
Could be a good idea to unlock that topic for a day or so.


Wed Apr 21, 2010 6:34 am
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Garbage Collection
Geti wrote:
Could be a good idea to unlock that topic for a day or so.

A Moderator to the rescue *dun dun daaaa*


Wed Apr 21, 2010 7:05 am
Profile
User avatar

Joined: Sun Aug 09, 2009 9:26 am
Posts: 1633
Reply with quote
Post Re: Garbage Collection
A lagless computer mod? Could it really be? I are amazed!


Thu Apr 22, 2010 9:03 pm
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Garbage Collection
seems like a pretty obvious thing to do, any time you handle tons of declarations and tables you should be doing this

you should not be collecting garbage 24/7 with your brain just for the sake of it

it won't improve your performance unless you're running scripts made by someone who doesn't know lua(anyone making anything that actually needs this would probably have it included already)


Thu Apr 22, 2010 10:13 pm
Profile
User avatar

Joined: Tue Aug 11, 2009 2:42 am
Posts: 321
Location: On an iceberg typing away...
Reply with quote
Post Re: Garbage Collection
Umm will this help this?


Fri Apr 23, 2010 2:39 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.048s | 14 Queries | GZIP : Off ]