Splitting havok tasks.
This commit is contained in:
@@ -566,9 +566,21 @@ public class PlayerDataFactory
|
||||
await _papParseLimiter.WaitAsync(ct).ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
papIndices = await _dalamudUtil
|
||||
.RunOnFrameworkThread(() => _modelAnalyzer.GetBoneIndicesFromPap(hash, persistToConfig: false))
|
||||
.ConfigureAwait(false);
|
||||
var cacheEntity = _fileCacheManager.GetFileCacheByHash(hash);
|
||||
var papPath = cacheEntity?.ResolvedFilepath;
|
||||
|
||||
if (!string.IsNullOrEmpty(papPath) && File.Exists(papPath))
|
||||
{
|
||||
var havokBytes = await Task.Run(() => XivDataAnalyzer.ReadHavokBytesFromPap(papPath), ct)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (havokBytes is { Length: > 8 })
|
||||
{
|
||||
papIndices = await _dalamudUtil.RunOnFrameworkThread(
|
||||
() => _modelAnalyzer.ParseHavokBytesOnFrameworkThread(havokBytes, hash, persistToConfig: false))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user