OData / OData/AspNetCoreOData

ObjectResult Execution taking more time in OData controller

Open
#752 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Assemblies affected
ASP.NET Core OData 7.6.1

Describe the bug
Get method response by taking 90 seconds to write 312KB data. Previous version taking only 10 ms.
Once the ObjectResult was executed, it took longer.

Debug logs for

  1. Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Entity, Controller, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
  2. Executed action Controller.Get in 70370.5575ms

Reproduce steps

  1. Create an OData service with an endpoint that returns IEnumerable>
  2. returns more than 300 records

Data Model
public class DataSource
{
public Guid DataSourceId { get; set; }
public Guid TenantId { get; set; }
public string DataSourceName { get; set; }
public string EndPoint { get; set; }
public string Token { get; set; }
public bool Disabled { get; set; }
public DateTimeOffset LastDataReceivedTime { get; set; }
public UserDetails CreatedBy { get; set; }
}

public class UserDetails
{
public string User { get; set; }
public string EmailAddress { get; set; }
public DateTimeOffset DateOfOperation { get; set; }
}

Expected behavior
I expect the request to be processed like it was in previous versions and for the service to produce a response in milli seconds
Debug logs for

  1. Executing ObjectResult, writing value of type 'System.Collections.Generic.List`1[[Entity, Controller, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
  2. Executed action Controller.Get in 1867.7849ms

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the ASP.NET Core OData 7.6.1 request using an OData controller endpoint returning IEnumerable with more than 300 records. Start at ObjectResult execution and compare the roughly 90-second response with the previous-version timing; done means the request returns in milliseconds rather than taking tens of seconds.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.