Improved RenderableCache item invalidation, Added Performance Statistics window

This commit is contained in:
dexy
2018-12-05 16:23:34 +11:00
Unverified
parent 9f701ee44b
commit 0c4001fa4b
10 changed files with 851 additions and 30 deletions
+26 -1
View File
@@ -15,7 +15,6 @@ namespace CodeWalker.GameFiles
public RpfManager RpfMan;
private Action<string> UpdateStatus;
private Action<string> ErrorLog;
public long CurrentMemoryUsage = 0;
public int MaxItemsPerLoop = 1; //to keep things flowing...
private ConcurrentStack<GameFile> requestQueue = new ConcurrentStack<GameFile>();
@@ -88,6 +87,32 @@ namespace CodeWalker.GameFiles
private string GTAFolder;
private string ExcludeFolders;
public int QueueLength
{
get
{
return requestQueue.Count;
}
}
public int ItemCount
{
get
{
return mainCache.Count;
}
}
public long MemoryUsage
{
get
{
return mainCache.CurrentMemoryUsage;
}
}
public GameFileCache(long size, double cacheTime, string folder, string dlc, bool mods, string excludeFolders)
{
mainCache = new Cache<GameFileCacheKey, GameFile>(size, cacheTime);//2GB is good as default