Performance issues with GetSaveDataAsync()
Posted: Tue Nov 16, 2021 6:06 am
Hello!
We are working with the Dialogue System (Version 2.2.0) in a bigger project and are experiencing some performance issues with the PersistantObjectManager.GetSaveDataAsync() (using this implementation: https://www.pixelcrushers.com/dialogue_ ... nager.html). These performance problems are only notable on the Nintendo Switch and not on a PC. There is a significant lag when using the function on the Switch. First it was implemented using the GetSaveData() function, which also caused performance problems. Unfortunately switching to the GetSaveDataAsync() function didn't solve the issue. To make sure nothing else is causing this, I singled out the function and called it specifically on a button press. This is the implementation:
Adding debug logs showed that the operation is executing over a few frames ("Working on async operation" is printed 6 times), but it still seems to be too much to handle for the Switch. Increasing or decreasing the asyncDialogueEntryBatchSize didn't change the performance. Sim status is not included in saving. These are Unity's deep profiling results on the Nintendo Switch:
Do you have any suggestions for this? Thanks in advance!
We are working with the Dialogue System (Version 2.2.0) in a bigger project and are experiencing some performance issues with the PersistantObjectManager.GetSaveDataAsync() (using this implementation: https://www.pixelcrushers.com/dialogue_ ... nager.html). These performance problems are only notable on the Nintendo Switch and not on a PC. There is a significant lag when using the function on the Switch. First it was implemented using the GetSaveData() function, which also caused performance problems. Unfortunately switching to the GetSaveDataAsync() function didn't solve the issue. To make sure nothing else is causing this, I singled out the function and called it specifically on a button press. This is the implementation:
Code: Select all
private IEnumerator GetSaveData()
{
Debug.Log("Starting async operation.");
var asyncOp = PersistentDataManager.GetSaveDataAsync();
while (!asyncOp.isDone)
{
Debug.Log("Working on async operation.");
yield return ;
}
string mySaveData = asyncOp.content;
Debug.Log("Async operation finished.");
}
Do you have any suggestions for this? Thanks in advance!