thyme garbage collection?

About advanced scenes, and the Thyme scripting language used in Algodoo.

thyme garbage collection?

Postby Mr_Stabby » Sun Mar 07, 2010 1:24 pm

Im building something that would REALLY benefit from a spawner engine, the trouble is that i specifically avoid using that type of propulsion due to the memory leak algodoo seems to have (every spawned object still says in memory even after its long gone from the scene thus slowing the program down till you restart), i dont know if its intentional by the coders or not but does anybody have a clue as to wether algodoo has a counter system for that and how to trigger it? or maybe a way to kill objects so that they are really dead?
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: thyme garbage collection?

Postby KarateBrot » Sun Mar 07, 2010 6:23 pm

I never had this problem. Once they get deleted via thyme they're gone. What do you do to delete them?
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: thyme garbage collection?

Postby Mr_Stabby » Sun Mar 07, 2010 8:21 pm

make a random spawner and check your task manager, it starts eating memory like crazy and even after you delete the spawned stuff via killing or a script or whatever the memory usage stays, this tells me algodoo doesent really delete objects but just disables them which is common for programs while they r running performance critical tasks, however usually what follows is garbage collection which seems to be missing from algodoo
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: thyme garbage collection?

Postby KarateBrot » Mon Mar 08, 2010 1:02 am

Maybe it's only your PC. I spawned circles over a period of 4 minutes and it was far from lagging. My CPU load was the same as usual (constant about 8%) and my swap file (about 840MB) didn't change either.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: thyme garbage collection?

Postby Mr_Stabby » Mon Mar 08, 2010 6:35 am

well i just loaded up algodoo -> 255mb memory use 2% cpu, made a box to spawn b collide circles on laser hit, pointed 4 lasers at it for faster results 4 mins later my fps at 4, cpu 79%, memory 665mb with 18143 circles spawned. i hit undo and my cpu drops to around 30%, mem stays at 665 even tho there are only 3 planes, 4 lasers and 1 box in the scene. i hit go again and for a while the mem use climbs steadily to 800ish then the program freezes for half a sec and mem use drops to 550mb(the thing im looking for), 4 mins later my fps at around 4 again cpu @ 60% and memory @ 873mb but this time with only 12785 circles spawned, i delete everything cpu drops to 30% mem stays at 873 and from this point on even simple scenes and phunlets are kinda sluggish and laggy not to mention the scene that i wanna use it for which already has over 500 components
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: thyme garbage collection?

Postby KarateBrot » Mon Mar 08, 2010 2:43 pm

weird. does somebody else get this problem?
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: thyme garbage collection?

Postby daniels220 » Mon Mar 08, 2010 8:19 pm

Yep, I was playing around with a crappy scripted "automatic shotgun" of sorts that spawned hundreds of circles in a little group using lasers. Messed around with it for a few minutes, must have spawned 10-20k circles total, and Algodoo got rather slow even though I had the ground plane on killer so none of the circles stuck around. Restarting Algodoo fixes the problem, and also frees up a ton of memory, so I'd say it's definitely a GC issue.
daniels220
 
Posts: 95
Joined: Mon Aug 31, 2009 11:30 pm

Re: thyme garbage collection?

Postby Ivanlul » Sat Mar 13, 2010 12:38 am

Happens to me too.
Registered: 2008-10-16
Image
User avatar
Ivanlul
 
Posts: 763
Joined: Mon Aug 31, 2009 11:19 pm
Location: US

Re: thyme garbage collection?

Postby RA2lover » Sun Apr 04, 2010 9:08 pm

same to me, but it only happens after about 1 hour of collideprobe polygon spawning, which means 3.6 million polygons spawned.

that's a huge aumount of them, and i think the memory leak doesn't exist - just computer's overheating :lol:
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: thyme garbage collection?

Postby canadian joe » Mon Apr 05, 2010 10:17 pm

possibly the reason the shapes are not "dead" is so that the undo button keeps it's purpose. the system has to keep all things that happen in memory so that you can undo it. but i know nothing about computer memory storage so if im wrong don't hold it against me
canadian joe wrote:im just writing this so i can sig it


RicH wrote:Phun's Army.
User avatar
canadian joe
 
Posts: 115
Joined: Wed Feb 10, 2010 9:42 pm

Re: thyme garbage collection?

Postby Chronos » Tue Apr 06, 2010 3:55 am

But you can only undo up to a certain amount (you can set it, of course). After that, they're unneeded.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: thyme garbage collection?

Postby canadian joe » Wed Apr 07, 2010 11:18 pm

good point. so i guess my info is no longer needed.
canadian joe wrote:im just writing this so i can sig it


RicH wrote:Phun's Army.
User avatar
canadian joe
 
Posts: 115
Joined: Wed Feb 10, 2010 9:42 pm

Re: thyme garbage collection?

Postby Antotabo » Tue Apr 13, 2010 4:34 am

Have you tried to set Max Undo to zero?? maybe then you will get immediate results.
Antotabo
 
Posts: 54
Joined: Tue Sep 01, 2009 6:27 am

Re: thyme garbage collection?

Postby Chronos » Tue Apr 13, 2010 12:06 pm

Then you can't undo. :|
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: thyme garbage collection?

Postby ioncann0ns » Tue Apr 13, 2010 11:38 pm

Chronos wrote:Then you can't undo. :|

Correct, you also have far less lag. :P
Image
User avatar
ioncann0ns
 
Posts: 220
Joined: Tue Sep 01, 2009 12:58 am

Re: thyme garbage collection?

Postby RicH » Wed Apr 14, 2010 3:14 am

For the price of always being careful to not make a mistake ever again. :D
Millions of voices suddenly cried out in terror, and were suddenly silenced. Something terrible has happened.
User avatar
RicH
[Funniest Person 2010]
 
Posts: 2043
Joined: Tue Sep 01, 2009 9:01 am

Re: thyme garbage collection?

Postby Mr_Stabby » Wed Apr 14, 2010 1:53 pm

the undo/redo option doesent really make sense to me tho because the moment you change anything after undo all your redo options are gone and since spawning stuff in an active scene is strictly a future thing from any point so should be gone all the spawned data. Also i wanna reexplain my original point which many seemed to miss -

Lets imagine all objects of the scene are stored in memory with a bunch of custom data arrays that hold all possible information about the object. What i suspect is that in that array there is also a "dead" variable so when object gets killed in the scene somehow, instead of erasing the entire array only the dead variable gets set to true which prevents it from interacting with anything else in the scene.. now while this makes sense from the roaming performance pov and is a technique used widely in all kinds of programs it has a downside of cluttering the memory with a bunch of dead objects after a while. Usually there is a countermechanism that at some point really deletes the objects by erasing them from ram completely instead of just flipping the dead switch but in algodoo it seems to be missing or faulty or whatever.
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: thyme garbage collection?

Postby Altro » Sun Apr 25, 2010 3:45 pm

If I remember correctly, the best way to fix this was to refresh your ram with a tool somewhere. This worked for me, alas the tool is now long gone and I forgot it's name. The tool got rid of all the ram that wasnt being used, or something like that, ie for Algodoo (and Phun) it drasticly reduced the amount of Ram being used

Yes, the above message makes no what so ever (probably)
http://www.speedtest.net/result/546516101.png
EAT THAT LOWLOL ( now ivanlul)! ALMOST DOUBLE YOUR DL SPEED! - HAVE FASTEST INTERNET SPEED IN FORUMS! w00t!
I was on the old forums aswell
I cant be a Phundamentalist because Im crap at algodoo.
"Every cloud has silver lining. Except the mushroom shaped ones, which have a lining of Iridium and Strontium 90."- Kevin Holmes
Altro
 
Posts: 94
Joined: Mon Aug 31, 2009 5:56 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 19 guests