diff options
author | Mic Bowman | 2012-05-10 09:08:40 -0700 |
---|---|---|
committer | Mic Bowman | 2012-05-10 09:08:40 -0700 |
commit | de44734fe9a0b31cd8cb78c0f58e61a35fe2a259 (patch) | |
tree | 6b6b50a0a4cdf493ec4c5b46ceaef8c01fe64dba /OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |
parent | Where necessary, rename OpenSim/Services/Connectors/*.cs files to reflect the... (diff) | |
download | opensim-SC_OLD-de44734fe9a0b31cd8cb78c0f58e61a35fe2a259.zip opensim-SC_OLD-de44734fe9a0b31cd8cb78c0f58e61a35fe2a259.tar.gz opensim-SC_OLD-de44734fe9a0b31cd8cb78c0f58e61a35fe2a259.tar.bz2 opensim-SC_OLD-de44734fe9a0b31cd8cb78c0f58e61a35fe2a259.tar.xz |
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.
Diffstat (limited to 'OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 45b8d6f..0065702 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -122,9 +122,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
122 | Thread.CurrentThread.ManagedThreadId.ToString() + | 122 | Thread.CurrentThread.ManagedThreadId.ToString() + |
123 | ")"); | 123 | ")"); |
124 | 124 | ||
125 | m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); | 125 | bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); |
126 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); | 126 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); |
127 | regionsToLoad[i].EstateSettings.Save(); | 127 | if (changed) |
128 | regionsToLoad[i].EstateSettings.Save(); | ||
128 | 129 | ||
129 | if (scene != null) | 130 | if (scene != null) |
130 | { | 131 | { |