fix some performance issues

This commit is contained in:
rootdarkarchon
2023-01-05 17:57:30 +01:00
parent 7e87dc61e7
commit 90a25c23dc
5 changed files with 25 additions and 9 deletions

View File

@@ -9,6 +9,7 @@ using System.Collections.Concurrent;
using System.Text;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
using System.Threading.Tasks;
namespace MareSynchronos.Managers;
@@ -126,10 +127,13 @@ public class IpcManager : IDisposable
private void ResourceLoaded(IntPtr ptr, string arg1, string arg2)
{
if (ptr != IntPtr.Zero && string.Compare(arg1, arg2, true, System.Globalization.CultureInfo.InvariantCulture) != 0)
Task.Run(() =>
{
PenumbraResourceLoadEvent?.Invoke(ptr, arg1, arg2);
}
if (ptr != IntPtr.Zero && string.Compare(arg1, arg2, true, System.Globalization.CultureInfo.InvariantCulture) != 0)
{
PenumbraResourceLoadEvent?.Invoke(ptr, arg1, arg2);
}
});
}
private void HandleActionQueue()