flotsam: slow it a lot more, make some debug log visible
parent
d52b794828
commit
bd2476c61e
|
@ -679,7 +679,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
private void CleanupExpiredFiles(object source, ElapsedEventArgs e)
|
private void CleanupExpiredFiles(object source, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
long heap = 0;
|
long heap = 0;
|
||||||
if (m_LogLevel >= 2)
|
//if (m_LogLevel >= 2)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Start automatic Check for expired files older then {0}.", m_FileExpiration);
|
m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Start automatic Check for expired files older then {0}.", m_FileExpiration);
|
||||||
heap = GC.GetTotalMemory(false);
|
heap = GC.GetTotalMemory(false);
|
||||||
|
@ -697,8 +697,10 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
// An asset cache may contain local non-temporary assets that are not in the asset service. Therefore,
|
// An asset cache may contain local non-temporary assets that are not in the asset service. Therefore,
|
||||||
// before cleaning up expired files we must scan the objects in the scene to make sure that we retain
|
// before cleaning up expired files we must scan the objects in the scene to make sure that we retain
|
||||||
// such local assets if they have not been recently accessed.
|
// such local assets if they have not been recently accessed.
|
||||||
|
m_log.Info("[FLOTSAM ASSET CACHE] start touch files of assets in use");
|
||||||
TouchAllSceneAssets(false);
|
TouchAllSceneAssets(false);
|
||||||
int cooldown = 0;
|
int cooldown = 0;
|
||||||
|
m_log.Info("[FLOTSAM ASSET CACHE] asset files expire");
|
||||||
if (Directory.Exists(m_CacheDirectory))
|
if (Directory.Exists(m_CacheDirectory))
|
||||||
{
|
{
|
||||||
foreach (string dir in Directory.GetDirectories(m_CacheDirectory))
|
foreach (string dir in Directory.GetDirectories(m_CacheDirectory))
|
||||||
|
@ -711,7 +713,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
m_CacheCleanTimer.Start();
|
m_CacheCleanTimer.Start();
|
||||||
m_cleanupRunning = false;
|
m_cleanupRunning = false;
|
||||||
}
|
}
|
||||||
if (m_LogLevel >= 2)
|
//if (m_LogLevel >= 2)
|
||||||
{
|
{
|
||||||
heap = GC.GetTotalMemory(false) - heap;
|
heap = GC.GetTotalMemory(false) - heap;
|
||||||
double fheap = Math.Round((double)(heap / (1024 * 1024)),3);
|
double fheap = Math.Round((double)(heap / (1024 * 1024)),3);
|
||||||
|
@ -976,8 +978,8 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
gatherer.AddForInspection(e);
|
gatherer.AddForInspection(e);
|
||||||
gatherer.GatherAll();
|
while(gatherer.GatherNext())
|
||||||
|
{
|
||||||
if (++cooldown > 100)
|
if (++cooldown > 100)
|
||||||
{
|
{
|
||||||
Thread.Sleep(50);
|
Thread.Sleep(50);
|
||||||
|
@ -985,6 +987,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
entities = null;
|
entities = null;
|
||||||
if (!m_timerRunning && !tryGetUncached)
|
if (!m_timerRunning && !tryGetUncached)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue