mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 11:54:32 +08:00
Improved RenderableCache item invalidation, Added Performance Statistics window
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user