Jump to content

Suspend Minecraft instance in VM/Docker container to enable faster loading times?


Recommended Posts

Posted

Forge load times are still not excellent for me and many other people, even with a decent PC and fast SSD. I'm not an expert on the JVM or how Forge works by any means, but could it be possible to simply load Minecraft into the menu, and then save that state to be reloaded into system memory is started? My install with about 100 mods only consumes around 1.1-1.25GB of RAM at the menu screen, and loading a gig of data off the SSD is surely going to be faster than the entire Forge load process which for me takes around 5 1/2 minutes from clicking Play. And it wouldn't cause unnecessary SSD wear as the same instance could be loaded over and over again as long as no mods are changed. Is this a batshit crazy idea or could it possibly be done with some kind of process isolation program like Docker or Kubernetes. I've already seen some servers being run in Docker containers, with some tests of the client being loaded from it out there. Suspending and resuming the process with Resource Monitor on Windows seems to cause no adverse issues, and I know reloading this data from disk will be much harder but at least this shows it doesn't mind having its execution paused. Please let me know if this is completely ridiculous or possibly worth pursuing.

Posted (edited)

I believe this has been brought up many times in previous threads, and the answer in those threads is no.

 

There are many reasons mentioned, such as you can never know whether the states should be reloaded (if If should have changed), and whether the state of the game should be the same even if mod list, config, etc remains the same.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted
On 4/4/2020 at 6:33 PM, DavidM said:

I believe this has been brought up many times in previous threads, and the answer in those threads is no.

 

There are many reasons mentioned, such as you can never know whether the states should be reloaded (if If should have changed), and whether the state of the game should be the same even if mod list, config, etc remains the same.

In the end I found a solution that works for me. Using the pssuspend tool and a quick C# app, I've made a program that pauses Minecraft's thread so it can sit in the background ready to be played at any time, resuming almost instantly. Windows also seems to automatically cache most of the app's memory contents to disk, meaning it uses 0% CPU and only about 200mb of ram while sitting in the background.

image.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.