This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PixelToast's profile picture

Auto Shutdown Shell

Started by PixelToast, 24 August 2013 - 04:34 AM
PixelToast #1
Posted 24 August 2013 - 06:34 AM
i edited the bios to auto shutdown if there is no user input for 2 minutes
unless there is a startup file, and this only applies once so when you edit something and leave for two minutes it dosent erase your stuff
i have noticed this significantly reduces computer lag on my server, as most people just right click computers type ls and leave and the computer remains on forever eating resources
ElvishJerricco #2
Posted 24 August 2013 - 12:54 PM
A lot of people write programs that run in the background behind the shell. How is the shell supposed to not stop for that? Maybe a shell.setAutoShutdown() function to disable it if you want? Of course then if someone runs os.run({},"shell") for some reason you run into the problem again…
GopherAtl #3
Posted 24 August 2013 - 03:57 PM
ElvishJerricco, "unless there is a startup file" any program running background tasks almost certainly has a startup file.

Pixel, Not clear what you mean by "only applies once." Also, pastebin is no longer blocking us, so you can stop inciting panic and update your sig now.
Cloudy #4
Posted 24 August 2013 - 06:54 PM
You obviously have no idea how ComputerCraft works. The only resource a computer will use while it is not running is ticking any timers the computer has set once per tick. It honestly will cause no "lag" at all doing this. While a computer is not actually having any events fired, it will not run any Lua code at all.

Methinks you're seeing a benefit because you want to see a benefit.
PixelToast #5
Posted 24 August 2013 - 08:08 PM
and in the process of testing, i spawned around 200 computers
out of memory! i even allocated 2GB to it and my server crashes instantly
:)/>
Cloudy #6
Posted 24 August 2013 - 08:12 PM
You were talking about lag, not memory. The two are different. Make your mind up?
immibis #7
Posted 24 August 2013 - 10:32 PM
Increased memory use could cause garbage collection to occur more often, causing lag.
Cloudy #8
Posted 25 August 2013 - 10:51 PM
No shit? Smart arse immibis saves the day again?

TL;DR - not gonna happen, get a better server.