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

polling use first instead of last #653

Open
erwan-joly opened this issue Jun 23, 2023 · 1 comment
Open

polling use first instead of last #653

erwan-joly opened this issue Jun 23, 2023 · 1 comment

Comments

@erwan-joly
Copy link

erwan-joly commented Jun 23, 2023

It appears that there is an issue with the JavaScript component responsible for polling the next result on the results-index page. The page is arranged in descending order by time, with the most recent item at the top. However, the last ID used for polling is the least recent one, causing the page to continuously grow larger as it retrieves n-1 results with each polling iteration.

image

Most likely the error is here https://github.com/MiniProfiler/dotnet/blob/a009d55a19050c8b88a3ea0c357d54ad192763b5/src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts#L439C57-L439C64

it should be oldData[0]

Note even with that fix we will end up with the wrong result displayed as it will display all the new results at the bottom...

that's what we currently would see with 3 items:

first load
3
2
1
polling last id=1
3
2
polling last id = 2
3
polling last id = 3
polling last id = 3
polling last id = 3

if we use oldData[0]
this would work like that:

first load
3
2
1
polling last id = 3
polling last id = 3
polling last id = 3

but as soon as we get a new id 4 the polling will push it at the end and the page table will now display

3
2
1
polling last id = 3
4
@axylophon
Copy link

axylophon commented Jan 10, 2024

We have the same problem. I think #550 is the cause.

  • ASP.NET Core (WebAPI)
  • .NET 7.0
  • MiniProfiler.AspNetCore.Mvc 4.3.8
  • MiniProfiler.EntityFramework.Core 4.3.8

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

No branches or pull requests

2 participants