Extreme slowdowns and memory usage
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
23 posts
• Page 1 of 2 • 1, 2
Extreme slowdowns and memory usage
by Jaedayr » 17 Dec 2011, 23:32
Over the past three days I have noticed that after playing for about an hour and a half, Forge starts getting random extreme slowdowns. These happen during any phase, any action. It can take up to two minutes to resolve whatever action is trying to take place. I have been looking at Task Manager (XP) and have noticed that it is using anywhere from 5-50 pct CPU but that memory usage during the slowdown looks really funny to me. It will drop to as low as 8M, then bounce around 50-150M for several seconds, then shoot up to over 900M, back down to around 100M, sometimes repeating this cycle before completing the action and returning control to the mouse. The next few actions run as normal, then the same kind of slowdown occurs again.
I finally had to quit the game I was in, as it was unplayable. Is anybody else seeing this? Is this kind of memory usage normal? I have had slowdowns in the past, but nothing like this.
I am grabbing the latest from the SVN each day.
I finally had to quit the game I was in, as it was unplayable. Is anybody else seeing this? Is this kind of memory usage normal? I have had slowdowns in the past, but nothing like this.
I am grabbing the latest from the SVN each day.
Re: Extreme slowdowns and memory usage
by friarsol » 17 Dec 2011, 23:44
A few people have reported it in the UI thread. I haven't really seen this on my main desktop, but I also have a Quadcore with 8 Gigs of Memory. I did see it last night on my laptop showing up after 3 games or so. I haven't looked into it deeply, but I'd bet that some UI element isn't being freed in a certain circumstance, which would cause the garbage collector not to free up memory when it needs to.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Extreme slowdowns and memory usage
by slapshot5 » 27 Dec 2011, 04:29
I've made some changes that should help this. I think there are a few more Listeners that need to be cleaned up, but I want to see if this helps.
Please try current SVN or the next nightly build and report if slowdowns have improved, or if nothing has changed.
-slapshot5
Please try current SVN or the next nightly build and report if slowdowns have improved, or if nothing has changed.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Extreme slowdowns and memory usage
by slapshot5 » 27 Dec 2011, 14:03
Ok, there was a Listener leak on the Mana Pool labels too. I have those fixed in SVN. Those are all the leaks I know about. If people are still seeing problems with a 12/27 or later nightly build, we need to investigate further, otherwise, this issue should be fixed.
-slapshot5
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Extreme slowdowns and memory usage
by Chris H. » 27 Dec 2011, 14:18
`slapshot5 wrote:Ok, there was a Listener leak on the Mana Pool labels too. I have those fixed in SVN. Those are all the leaks I know about. If people are still seeing problems with a 12/27 or later nightly build, we need to investigate further, otherwise, this issue should be fixed.
Thank you Slapshot.
I updated my Snow Leopard Dev system to your most recent bug fix. I have attempted to do a snapshot build and release but it looks like cardforge is having some problems.
I will try another snapshot build and release later today, want to give the cardforge site some time to fix their problem.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Extreme slowdowns and memory usage
by Chris H. » 27 Dec 2011, 16:06
I was finally able to release the next snapshot to cardforge:
forge-1.2.0-20111227.153706-12.tar.bz2
forge-1.2.0-20111227.153706-12-osx.tar.bz2
forge-1.2.0-20111227.153706-12.tar.bz2
forge-1.2.0-20111227.153706-12-osx.tar.bz2
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Extreme slowdowns and memory usage
by slapshot5 » 05 Jan 2012, 13:54
Added another fix last night to plug a leak on InputControl.
There is still a leak (and maybe a double leak) on MagicStack that I haven't figured out yet.
-slapshot5
There is still a leak (and maybe a double leak) on MagicStack that I haven't figured out yet.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Extreme slowdowns and memory usage
by Chris H. » 05 Jan 2012, 14:31
`slapshot5 wrote:Added another fix last night to plug a leak on InputControl.
There is still a leak (and maybe a double leak) on MagicStack that I haven't figured out yet.
Thank you.
I would not mind releasing the next beta once you figure out how to fix that leak.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Extreme slowdowns and memory usage
by slapshot5 » 06 Jan 2012, 04:26
Ok, I fixed the Observers leak on MagicStack. Didn't see any problems play-testing.
Testers - if you've been having slowdowns with the new GUI after several matches, it should be at least somewhat better. Please report experiences with Jan 6, 2012 or later nightly builds.
-slapshot5
Testers - if you've been having slowdowns with the new GUI after several matches, it should be at least somewhat better. Please report experiences with Jan 6, 2012 or later nightly builds.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Extreme slowdowns and memory usage
by slapshot5 » 07 Jan 2012, 04:25
Made another fix for Hand Zone. The addXXXListener stuff has got me a little concerned. It's not easy to see where the leaks are with those.
Please report on the next daily build.
-slapshot5
Please report on the next daily build.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Extreme slowdowns and memory usage
by friarsol » 07 Jan 2012, 04:36
Yea it would probably be easier to just set them all as disposable and dispose the items at the end of a game.slapshot5 wrote:Made another fix for Hand Zone. The addXXXListener stuff has got me a little concerned. It's not easy to see where the leaks are with those.
Please report on the next daily build.
-slapshot5
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Extreme slowdowns and memory usage
by friarsol » 11 Jan 2012, 04:31
My memory is pretty stable at 300k but it seems that everytime I do any action after playing a few games my CPU is maxxed out, which is probably part of the slowdowns. We should find out what's so CPU intensive. And clean that up.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Extreme slowdowns and memory usage
by Doublestrike » 11 Jan 2012, 05:00
I'm figuring out the memory analyzer plugin now, hopefully a few heap dumps will tell the tale. Any tips or recommendations welcomeMy memory is pretty stable at 300k but it seems that everytime I do any action after playing a few games my CPU is maxxed out, which is probably part of the slowdowns. We should find out what's so CPU intensive. And clean that up.
One user said he's consuming 100MB per game - nowhere near what my testing box uses, that's amazing.
I've been poking around for the buffer error discussion but I can't seem to find it - can someone throw out a link if you know where it is?
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
Re: Extreme slowdowns and memory usage
by moomarc » 11 Jan 2012, 05:42
The most technical bits of discussion start here. Because its in the main thread you might have to scan through quite a bit of irrelevant stuff, but if I recall correctly, the bits that sound like they're from someone that's had actual expierence with troubleshooting it are on this page.Doublestrike wrote:I'm figuring out the memory analyzer plugin now, hopefully a few heap dumps will tell the tale. Any tips or recommendations welcomeMy memory is pretty stable at 300k but it seems that everytime I do any action after playing a few games my CPU is maxxed out, which is probably part of the slowdowns. We should find out what's so CPU intensive. And clean that up.
One user said he's consuming 100MB per game - nowhere near what my testing box uses, that's amazing.
I've been poking around for the buffer error discussion but I can't seem to find it - can someone throw out a link if you know where it is?
As for the 100MB per game, Mark was using HQ pics, so that probably had something to do with it.
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Extreme slowdowns and memory usage
by Doublestrike » 11 Jan 2012, 06:53
Ahh, 16 pages deep in the bugs thread, I guess I wasn't dedicated enough in my search!
Thanks for that!
I've got my JMap heap dumper, JHat analyzer, and Eclipse memory analyzer working now, so later tonight I'll have some time and hopefully unearth a few things. Will post a screenshot or two later, perhaps the hive mind can figure something out.
I've got my JMap heap dumper, JHat analyzer, and Eclipse memory analyzer working now, so later tonight I'll have some time and hopefully unearth a few things. Will post a screenshot or two later, perhaps the hive mind can figure something out.
---
A joke is a very serious thing.
A joke is a very serious thing.
-

Doublestrike - UI Programmer
- Posts: 715
- Joined: 08 Aug 2011, 09:07
- Location: Bali
- Has thanked: 183 times
- Been thanked: 161 times
23 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: ArchieRoW and 24 guests