Slow responses

Hello. When using the Unity package, I’m getting extremely long delays on some API calls with finds. When using the blocking API my app will sometimes freeze for 10-15 seconds, while the data is just blank for that amount of time in the non-blocking call.

Hello, @Christopher_Ellis.

Can you share with me example of your find request. And also, how much objects you tried to receive?
Additionally, which one version of unity-package are you using?

Regards, Nikita.

DataQueryBuilder dataQueryBuilder = DataQueryBuilder.Create();
dataQueryBuilder.SetWhereClause(Constants.USER_NAME + “= '” + userName + “'”);

        AsyncCallback<IList<Dictionary<string, object>>> callback;
        callback = new AsyncCallback<IList<Dictionary<string, object>>>(
            data =>
            {
                if (data != null && data.Count != 0)
                {
                    errorMessageRegister.text = DOUBLE_NAME;
                    WaitingScreen.Instance.Hide();
                    return;
                }

                errorMessageRegister.text = "";

                User.userName = userName;
                SetUserNameText();
                SaveUserName();
                ClearErrors();
                registerCompleteEvent?.Invoke();
            },

            fault =>
            {
                Debug.LogError("Error saving data to database. " + fault);
                WaitingScreen.Instance.Hide();
                return;
            });

        Backendless.Data.Of(Constants.GetConstantWithClientID(Constants.USER_NAME)).Find(dataQueryBuilder, callback);
    }));

Good morning, @Christopher_Ellis.

For me to be able to help you, I need you to answer all the questions. At the moment, the problem does not reproduce for me.
I used the latest version of unity-package.
Try adding more logs.

What version are you using?
How many objects are you trying to retrieve?
Are you sure that your code calls the Find method, perhaps the program before calling this method?

Regards, Nikita.

I believe it is version 6.2.3. We are receiving 0 or 1 item. The find method is at the bottom. Removing this call removes the freeze. The freeze is somewhat random, sometimes, the call is instant, and sometimes it can take as much as 15 seconds, which is a very long time to wait.

Hi @Christopher_Ellis

Try using the latest version of unity-package as Nikita suggested above. The problem is not reproduced there. Link to the package:

Regards,
Marina