Whats going on with the lag ?

Violent

Drinker Of Tea
Golden Oldie
Oct 7, 2008
1,071
203
150
Sheffield, UK
Maybe you’re right, but id rather have it saving within another thread outside the main thread.

Going to sql is a no go at this point, we’re trying to stabilize not create more problems.

You might struggle using another thread as it still needs to access all the objects on the main thread. It would require quite a structural change to the core code to do that. The only way I can think of at the moment is if you make a copy of the objects before the DB save. But that is going to require double the RAM usage.

As for SQL. You would definetly eliminate this issue with SQL. But I can tell you from experience that converting to SQL is not an easy job if you want it done properly. Now that you are live it would definetly be a very difficult risky move.
 

Sanity

LOMCN VIP
VIP
Nov 7, 2007
3,881
186
280
Have to agree, i seen a lot of fix's and changes but this should be top priority, it's horrible to play with at the moment.
 

Easymode

Banned
Banned
Aug 19, 2018
101
7
29
Yes use a separate thread to back the db / use locks sparingly where important data is concerned for that Snapshot should help prevent changes while in process and save . The new Data is already in memory anyway . Of course locking will block any other thread so it’s a difficult one . Corruption is a big risk as well . Lock db while reading and writing .

sql :
clone existing state of sever and source as new branch

Write a tool to migrate db to sql

db read write functions replaced with sql

Test

Test more

backup main server

migrate

test a hour .

Live
 
Last edited:

Chriz

Captain Lurker
VIP
Mar 24, 2003
1,198
1
336
315
LOMCN
Maybe you’re right, but id rather have it saving within another thread outside the main thread.

Going to sql is a no go at this point, we’re trying to stabilize not create more problems.

Like Violet said, using a different thread directly this could be risky/difficult.

Perhaps use the main thread to generate a memory stream for the binary to be written out, then once complete create a new thread to write the memory stream out to file, thus negating any IO locking on the main thread; assuming this is the issue.
 

mir2pion

TL;DR
Veteran
Feb 21, 2013
3,591
2
679
265
Not do like Myth of Soma use to do?

Back ups were every two hours but you could type /save after getting a rare drop.

logging out and back in is doing the same thing, just more galling especially if in cave where you get bumped to 1F upon reloging?
 

Binary

Dedicated Member
Dedicated Member
Dec 23, 2015
301
43
55
Have you guys actually looked at the code?

It's already written to a memory stream (RAM) and then the hard disk write is asynchronous on an independent thread...
 

Easymode

Banned
Banned
Aug 19, 2018
101
7
29
Have you guys actually looked at the code?

It's already written to a memory stream (RAM) and then the hard disk write is asynchronous on an independent thread...

What code? it's custom... you mean Crystal, I can't compare crystal to apoc as it's been changed. If you are privy to accessing the code please invite me in and I'll take a look.
 

Binary

Dedicated Member
Dedicated Member
Dec 23, 2015
301
43
55
What code? it's custom... you mean Crystal, I can't compare crystal to apoc as it's been changed. If you are privy to accessing the code please invite me in and I'll take a look.

Yes. We can pretend that they took the original code and deliberately made it much more inefficient if you please, but that's a bit silly.