It is currently 16 Apr 2024, 12:47
   
Text Size

Too much lag in new update

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Too much lag in new update

Postby peepser » 04 Oct 2018, 22:25

Why does the game slow to a crawl after an hour? I'm running it on a fast PC, with 8 gigs ram, and it always starts to lag, making it impossible to play. And the problem is this happens while I'm in the middle of a gauntlet against the AI. Is there any way to fix this?
peepser
 
Posts: 184
Joined: 14 Aug 2018, 22:30
Has thanked: 18 times
Been thanked: 10 times

Re: Too much lag in new update

Postby Reman » 05 Oct 2018, 18:12

Yeah there's a pretty significant memory leak problem after playing a bit. Closing the program an reopening fixes the issue, but it's annoying to have to do so.
Reman
 
Posts: 7
Joined: 05 Oct 2018, 18:09
Has thanked: 3 times
Been thanked: 0 time

Re: Too much lag in new update

Postby timmermac » 05 Oct 2018, 20:06

As has been mentioned, increase the amount of memory allocated to Java.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Too much lag in new update

Postby Reman » 06 Oct 2018, 22:19

timmermac wrote:As has been mentioned, increase the amount of memory allocated to Java.
How do you do this? I've Googled it for ~30 mins and all I can find are Minecraft settings tutorials.

Also, why is this even necessary? Isn't there a development setting that can default Java to have enough RAM to prevent this?

At the very least, I think a guide to assigning more RAM should be in the FAQ...
Reman
 
Posts: 7
Joined: 05 Oct 2018, 18:09
Has thanked: 3 times
Been thanked: 0 time

Re: Too much lag in new update

Postby peepser » 07 Oct 2018, 00:06

Yes, if there is a way to allocate more ram to java, I'd like to know what it is, too. Killing a gauntlet in mid game to get it moving again isn't a solution.
peepser
 
Posts: 184
Joined: 14 Aug 2018, 22:30
Has thanked: 18 times
Been thanked: 10 times

Re: Too much lag in new update

Postby Reman » 07 Oct 2018, 08:43

peepser wrote:Yes, if there is a way to allocate more ram to java, I'd like to know what it is, too. Killing a gauntlet in mid game to get it moving again isn't a solution.
Note, I think I might have found an alternative solution. One of the posts I unearthed on this forum indicated that starting the game from forge.exe instead of the Java JAR file could do the trick. I've been playing it through the executable for 6 hours now with no issues, which I was never able to do before.
Reman
 
Posts: 7
Joined: 05 Oct 2018, 18:09
Has thanked: 3 times
Been thanked: 0 time

Re: Too much lag in new update

Postby peepser » 07 Oct 2018, 18:11

I always start with the exe, still have the lag after an hour. I tried this https://www.wikihow.com/Increase-Java-M ... -Windows-7 but cannot confirm yet if it works. Edit: It does work! Edit: It extends the time a bit, but it eventually slows to a crawl after three hours.
Last edited by peepser on 10 Oct 2018, 21:02, edited 2 times in total.
peepser
 
Posts: 184
Joined: 14 Aug 2018, 22:30
Has thanked: 18 times
Been thanked: 10 times

Re: Too much lag in new update

Postby Fizanko » 07 Oct 2018, 23:03

Instead of starting with the exe , as from what i read it gives Forge a max memory of 1gb (so forge can be played on any system) , if you have more than that on your system , try this (at least on windows)

in the Forge directory where the forge.exe is existing , create a new text file (right click -> new -> text document)
inside that text file paste

Code: Select all
java -Xmx2048m -jar nameoftheforgejar.jar
with nameoftheforgejar.jar being the name of the .jar file that exist along forge.exe in that directory.

By example on the current snapshot i'm using , the name is
Code: Select all
forge-gui-desktop-1.6.17-SNAPSHOT-jar-with-dependencies.jar
So the line i have in my text file is
Code: Select all
java -Xmx2048m -jar forge-gui-desktop-1.6.17-SNAPSHOT-jar-with-dependencies.jar
Now the other important part is -Xmx2048m , it means it will allow a max of 2gb of memory being used by Forge.

It's important to point that in the case you only have 2gb of memory, it will not work, the OS + whatever background program are running already eat some memory.

Now if you have a lot of memory, you can increase this value by example to -Xmx4096m if you want to allow Forge to use at max 4gb (but make sure your system have more than that.

Now in case your system only have 2gb but you would like to still allow more than the default 1gb the forge.exe allows, try -Xmx1536m

Once you have setup that line in your text file correctly, save and close, then RENAME this new text file extension from its default .txt into .bat
by example rename
Code: Select all
New Text Document.txt
into
Code: Select all
Play Forge.bat
And instead of using the forge.exe to launch Forge, use this .bat file.
Remember that the name of the .jar file may change with newer version of Forge, so rename accordingly.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Too much lag in new update

Postby squee1968 » 08 Oct 2018, 03:13

followed the instructions above, but when i double click the .bat file, a black box appears briefly, but forge doesn't start.
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Too much lag in new update

Postby Fizanko » 08 Oct 2018, 12:04

Make sure you have the .bat file in the same directory as where your forge.exe (and the .jar file is), and make sure the .jar name is correct (depending on forge version or the snapshot used the .jar file name may be different)

If all is setup correctly, give a try with
Code: Select all
-Xmx1536m
I tried on an older system that has 3gb of memory and it does not start with -Xmx2048m for some reason , but with -Xmx1536m it works.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Re: Too much lag in new update

Postby Reman » 08 Oct 2018, 23:58

I similarly followed the instructions above, but am getting the same error as Squee. The command prompt opens briefly, then immediately closes without the game launching. For the record, my computer has 16 GB of RAM so that shouldn't be an issue.

Image
Reman
 
Posts: 7
Joined: 05 Oct 2018, 18:09
Has thanked: 3 times
Been thanked: 0 time

Re: Too much lag in new update

Postby friarsol » 09 Oct 2018, 00:31

Reman wrote:I similarly followed the instructions above, but am getting the same error as Squee. The command prompt opens briefly, then immediately closes without the game launching. For the record, my computer has 16 GB of RAM so that shouldn't be an issue.

Image
If it's opening and closing there's probably some error that it's spitting out that you can't see. You should be able to add this line to your batch file `set /p=Hit ENTER to continue...`
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Too much lag in new update

Postby Reman » 09 Oct 2018, 12:17

Indeed there was. I got the error "Too small initial heap".

Any idea how to fix it?
Reman
 
Posts: 7
Joined: 05 Oct 2018, 18:09
Has thanked: 3 times
Been thanked: 0 time

Re: Too much lag in new update

Postby peepser » 09 Oct 2018, 14:58

I can confirm that the link I previously posted above does work. I allowed 3 gigs of ram to java. I never had any slowdowns after playing over 2 hours.
peepser
 
Posts: 184
Joined: 14 Aug 2018, 22:30
Has thanked: 18 times
Been thanked: 10 times

Re: Too much lag in new update

Postby Fizanko » 09 Oct 2018, 18:44

Reman wrote:Indeed there was. I got the error "Too small initial heap".

Any idea how to fix it?
I noticed in your screenshot you have
Code: Select all
-Xmx2048
instead of
Code: Select all
-Xmx2048m
You forget the ' m ' after 2048, that may be why it does not work.
probably outdated by now so you should avoid : Innistrad world for Forge (updated 17/11/2014)
Duel Decks for Forge - Forge custom decks (updated 25/10/2014)
User avatar
Fizanko
Tester
 
Posts: 780
Joined: 07 Feb 2014, 11:24
Has thanked: 155 times
Been thanked: 94 times

Next

Return to Forge

Who is online

Users browsing this forum: No registered users and 50 guests


Who is online

In total there are 50 users online :: 0 registered, 0 hidden and 50 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 50 guests

Login Form