Author Topic: Autosaver with new brick format that has support for user added fields/values.  (Read 2915 times)

« Last Edit: December 01, 2013, 12:20:56 PM by DrenDran »

This is a blocking autosaver which will lag the server when saving.
Check out mine.

This is a blocking autosaver which will lag the server when saving.
Check out mine.
Kinda seems like a lot of extra work and code to get rid of less than a second of lag.
Obviously if there aren't that many bricks then there will be absolutely no lag, for saves of a couple dozen thousand it'll lag for a second or two.

Also, the new file format and variables and stuff.
« Last Edit: November 13, 2013, 07:58:14 AM by DrenDran »

Kinda seems like a lot of extra work and code to get rid of roughly four seconds of lag per hour.
Obviously if there aren't that many bricks then there will be absolutely no lag, for saves of a couple dozen thousand it'll lag for a second or two.

Also, the new file format and variables and stuff.
This means that you can lose up to an hour of work, which most people will find unacceptable. Your add-on shouldn't cause any lag, either.

Mine's just an example; you'll have to follow the example to fix your mod.

I'm with kalph on this

Several players on your server will disconnect if they get 4 second of lag...

I'm with kalph on this

Several players on your server will disconnect if they get 4 second of lag...
What?
I never said it lags the server for four seconds.
I said over an hour all the lag won't even be a few seconds.
It saves more than once per hour, please read the op before complaining.

make it so it only auto saves if someone has planted a brick since the last save

make it so it only auto saves if someone has planted a brick since the last save
Not a bad idea.
Well implement these when I return.
Well also get stats on the time it takes to save.

You forgot to add a description.txt.

You forgot to add a description.txt.
Wow.
That's what I get for making last minute changes.

make it so it only auto saves if someone has planted a brick since the last save
How about taking this a step further, and only saving newly added/modified bricks? That would remove ~90% of any lag.

You forgot to add a description.txt.
Done.

How about taking this a step further, and only saving newly added/modified bricks? That would remove ~90% of any lag.
Then you'd have a bunch of partial saves with tons of floating bricks.
A script to combine them would either be run when you wanted to load them (maybe, but it'd add time) or on saving, defeating the purpose.

For now it only saves if a brick has been planted since the last save.
« Last Edit: November 11, 2013, 02:08:05 PM by DrenDran »

It would append it, not create new save files for each few bricks..

It would append it, not create new save files for each few bricks..

Yeah, I guess that could work. It's even easier with this format than with the old one.
For now it only saves if a brick has been planted since the last save.

I don't know if I'll have time to do it now, but I'll try to work on it when I get home.

Kinda seems like a lot of extra work and code to get rid of roughly four seconds of lag per hour.