Saving estate state is really slow (relatively) and it gets

completely rewritten every time a region starts up. This
makes the data write only when the data was not already
read from the database.

There is a still a major race condition whenever two regions
share the same estate data, but at least it won't be triggered
on startup.
This commit is contained in:
Mic Bowman
2012-05-10 09:08:40 -07:00
parent d8a78374aa
commit de44734fe9
3 changed files with 13 additions and 9 deletions

View File

@@ -122,9 +122,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
Thread.CurrentThread.ManagedThreadId.ToString() +
")");
m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
regionsToLoad[i].EstateSettings.Save();
if (changed)
regionsToLoad[i].EstateSettings.Save();
if (scene != null)
{