Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.AspNet.OData NuGet Package Upgrade Causing delay in the Functionality #1264

Open
Akhil4025 opened this issue Jun 18, 2024 · 4 comments

Comments

@Akhil4025
Copy link

Hi,

I have upgraded Microsoft.AspNet.OData NuGet Package in our application from 7.5.14 to 7.7.5 and since then it is causing delay in few of the Api calls in the application. Before upgrade everything works fine without causing any delay. The scenario is same when I upgrade the same package to 7.6.0 and above versions.

Please advise if anyone knows the root cause of this behavior.

@julealgon
Copy link
Contributor

@Akhil4025 you will need to provide more detail than this. Can you repro the issue, maybe create a small sample that reproduces the slowdown?

@habbes
Copy link
Contributor

habbes commented Jun 18, 2024

@Akhil4025 could you share more information about the affected scenarios? Like @julealgon mentioned, a small sample that reproduces the issue would be great.

@habbes habbes self-assigned this Jun 18, 2024
@Akhil4025
Copy link
Author

Below is the code from .js file which is calling the Server side API.

var userNotificationFlag = {
"userID": $rootScope.userID,
"subscribeToNotificationFlag": value,
};

return $http({ method: 'POST', url: ApiUrl + 'Users', data: userNotificationFlag }).then(function (data) {
if (userData) {
userData = angular.copy(userData);
userData.notificationsOn = value;
}

Below is the Server Side API which is being called

[HttpPost]
public HttpResponseMessage Post([FromBody] Delta userPost) { }

The delay is happening when the control is trying to reach from .js code to .net code that I have mentioned above.

This is how our sever side code is being configured

WebApiConfig.cs:
EntitySetConfiguration userEntity = builder.EntitySet("Users");

Global.asax.cs:
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
}

@Akhil4025
Copy link
Author

And I tried to pass --> $rootScope.userID as the data alone after Odata upgrade Instead of

**var userNotificationFlag = {

"userID": $rootScope.userID,

"subscribeToNotificationFlag": value,

};**

and I observed that API call is quick as it was before the upgrade of Odata package. I'm not sure how the parameters are causing the issue after Odata upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants