Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Asynchronous Worldsaves
#1

Hey duds,

While trying to figure out a way to iterate over the massive amount of Items and Mobiles in memory without locking, I remembered the new ConcurrentDictionary<TKey, TValue> class in .NET 4.0. Vorspire had the idea to apply that to worldsaves Smile. I've already used ConcurrentDictionary for something similar at work, so I already know it will work for worldsaves. I just don't remember enough about RunUO to confidently implement it.

Vorspire does, though, and it looks like he's going to give it a go! Here's a thread worth subscribing to, as it might prove to be somewhat awesome in the not-so-distant-future.

http://www.runuo.com/community/threads/w...st-3838554
#2

I think we have saving without freezing now unless you use the .save command. I think it was included in one of the SVN updates.
#3

Yeah the RunUO dev team changed something with saves a while back which makes it save in the background or something. Takes about half a second to save 13k mobiles and 224k items
#4

They introduced the dynamic save strategy which uses the Task Parallel library to iterate over the items much, much faster. However, the collections still have to be locked on to prevent changes while going through them. ConcurrentDictionary make it easy for someone to implement a completely async save strategy where saves could be done in the background without locking at all.

It's fun stuff ;p


Forum Jump:


Users browsing this thread: 1 Guest(s)