Compare commits

...

8 Commits

Author SHA1 Message Date
Ubit Umarov
8002eaffb9 Merge pull request #56 from amandaleeang/hg-slow-fetch
Gate HGUuidGatherer per-asset Debug logs on WebUtil.DebugLevel
2026-08-09 18:25:48 +01:00
Amanda Lee
b10457f04a Gate HGUuidGatherer per-asset Debug logs on WebUtil.DebugLevel.
Per-asset Copied/Failed lines dominate HG attachment gather time under
sync File+Console appenders. Emit them only when HTTP debug is enabled
(debug http all|out N), keeping normal HG logins fast.
2026-08-10 00:12:03 +08:00
Ubit Umarov
35104e4960 Merge pull request #54 from amandaleeang/opensim-defaults
Add MinPoolThreads setting to OpenSimDefaults.ini
2026-08-08 21:16:48 +01:00
Amanda Lee
5d70f9e34d Add MinPoolThreads setting to OpenSimDefaults.ini 2026-08-08 17:50:47 +08:00
UbitUmarov
a87969840c fix m_regionSizeY change 2026-08-07 11:25:44 +01:00
UbitUmarov
460ed81f41 a few changes on the local maptiles folder code 2026-08-07 11:21:34 +01:00
UbitUmarov
b4b0d1773a Merge branch 'master' of https://github.com/opensim/opensim 2026-08-07 10:50:33 +01:00
UbitUmarov
46dd8c03bb missing commit ops 2026-08-07 10:49:45 +01:00
5 changed files with 52 additions and 13 deletions

View File

@@ -137,6 +137,18 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
m_mapTilesDirectory = m_mapTilesDirectory =
Util.GetConfigVarFromSections<string>(source, "MapTilesDirectory", configSections, m_mapTilesDirectory); Util.GetConfigVarFromSections<string>(source, "MapTilesDirectory", configSections, m_mapTilesDirectory);
if(!string.IsNullOrEmpty(m_mapTilesDirectory))
{
try
{
Directory.CreateDirectory(m_mapTilesDirectory);
}
catch(Exception e)
{
m_log.Error($"[MAPTILE]: failed to create folder {m_mapTilesDirectory} for local map tiles {e.Message}");
m_mapTilesDirectory = null;
}
}
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
@@ -215,10 +227,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
// image may be reloaded elsewhere, so no compression format // image may be reloaded elsewhere, so no compression format
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"; string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
if (!string.IsNullOrEmpty(m_mapTilesDirectory)) if (!string.IsNullOrEmpty(m_mapTilesDirectory))
{
Directory.CreateDirectory(m_mapTilesDirectory);
filename = System.IO.Path.Combine(m_mapTilesDirectory, filename); filename = System.IO.Path.Combine(m_mapTilesDirectory, filename);
}
tile.Save(filename,ImageFormat.Png); tile.Save(filename,ImageFormat.Png);
m_primMesher = null; m_primMesher = null;
return tile; return tile;

View File

@@ -130,10 +130,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
//m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
MapBlockData data;
if (regionInfos != null && regionInfos.Count > 0) if (regionInfos != null && regionInfos.Count > 0)
{ {
foreach (GridRegion info in regionInfos) foreach (GridRegion info in regionInfos)
{ {
data = new MapBlockData();
data.Agents = 0;
data.Access = info.Access;
MapBlockData block = new MapBlockData(); MapBlockData block = new MapBlockData();
MapBlockFromGridRegion(block, info, flags); MapBlockFromGridRegion(block, info, flags);

View File

@@ -27,7 +27,6 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
@@ -161,6 +160,19 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets); Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets);
m_mapTilesDirectory = m_mapTilesDirectory =
Util.GetConfigVarFromSections<string>(config, "MapTilesDirectory", configSections, m_mapTilesDirectory); Util.GetConfigVarFromSections<string>(config, "MapTilesDirectory", configSections, m_mapTilesDirectory);
if(!string.IsNullOrEmpty(m_mapTilesDirectory))
{
try
{
Directory.CreateDirectory(m_mapTilesDirectory);
}
catch(Exception e)
{
m_log.Error($"[WORLD MAP]: failed to create folder {m_mapTilesDirectory} for local map tiles {e.Message}");
m_mapTilesDirectory = null;
}
}
} }
public virtual void AddRegion(Scene scene) public virtual void AddRegion(Scene scene)
@@ -1340,12 +1352,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
startX--; startX--;
startY--; startY--;
bool doneLocal = false; bool doneLocal;
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"; string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
if (!string.IsNullOrEmpty(m_mapTilesDirectory))
filename = Path.Combine(m_mapTilesDirectory, filename);
try try
{ {
if (!string.IsNullOrEmpty(m_mapTilesDirectory))
filename = Path.Combine(m_mapTilesDirectory, filename);
using(Image localMap = Bitmap.FromFile(filename)) using(Image localMap = Bitmap.FromFile(filename))
{ {
int x = regionX - startX; int x = regionX - startX;
@@ -1364,7 +1376,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
} }
doneLocal = true; doneLocal = true;
} }
catch {} catch(Exception ex)
{
m_log.Error($"[WORLD MAP]: failed Export map file {ex.Message}");
return;
}
if(regions.Count > 0) if(regions.Count > 0)
{ {

View File

@@ -1337,10 +1337,15 @@ namespace OpenSim.Region.Framework.Scenes
{ {
string IDstr = assetID.ToString(); string IDstr = assetID.ToString();
AssetBase asset = m_assetService.Get(IDstr, m_assetServerURL, true); AssetBase asset = m_assetService.Get(IDstr, m_assetServerURL, true);
if (asset is null) // Per-asset Debug is expensive (sync File+Console). Only when HTTP debug is on:
m_log.Debug($"[HGUUIDGatherer]: Failed to fetch asset {IDstr} from {m_assetServerURL}"); // debug http all|out N (WebUtil.DebugLevel > 0)
else if (WebUtil.DebugLevel > 0)
m_log.Debug($"[HGUUIDGatherer]: Copied asset {IDstr} from {m_assetServerURL} to local asset server"); {
if (asset is null)
m_log.Debug($"[HGUUIDGatherer]: Failed to fetch asset {IDstr} from {m_assetServerURL}");
else
m_log.Debug($"[HGUUIDGatherer]: Copied asset {IDstr} from {m_assetServerURL} to local asset server");
}
return asset; return asset;
} }

View File

@@ -61,6 +61,10 @@
; QueueUserWorkItem, SmartThreadPool, and Thread. ; QueueUserWorkItem, SmartThreadPool, and Thread.
async_call_method = SmartThreadPool async_call_method = SmartThreadPool
; Min threads to allocate on the FireAndForget thread pool
; when running with the SmartThreadPool option above
MinPoolThreads = 2
; Max threads to allocate on the FireAndForget thread pool ; Max threads to allocate on the FireAndForget thread pool
; when running with the SmartThreadPool option above ; when running with the SmartThreadPool option above
MaxPoolThreads = 300 MaxPoolThreads = 300
@@ -470,7 +474,7 @@
; Directory used to load and save the generated MAP-<region uuid>.png tile images. ; Directory used to load and save the generated MAP-<region uuid>.png tile images.
; If left empty the current working directory is used (default behaviour). ; If left empty the current working directory is used (default behaviour).
; The directory is created automatically if it does not exist. ; The directory is created automatically if it does not exist.
;MapTilesDirectory = "./maptiles" ;MapTilesDirectory = "./localmaptiles"
; World map blacklist timeout in seconds ; World map blacklist timeout in seconds
;BlacklistTimeout = 600 ;BlacklistTimeout = 600