Open Closed

Linked Account modal is too slow #4568


User avatar
1
enes.koroglu created
  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We are creating a support account, under every tenant and we are linking these accounts each other. Now we have aproximately 50 tenant and when we open Linked Accounts modal, it takes 30 seconds. This is really slow, if the number exceeds user gets timeout (so we removed some records to be able to open Linkend Accounts screen). I realised this endpoints gets whole records, not only selected page's records and also 50 records is not too much to take 30 seconds. I think there is a problem.


15 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    I see that you have 52 users. This should be very fast. There might be something wrong with the DB indices.

  • User Avatar
    0
    enes.koroglu created

    Hi @alper did you try on your environment? Which indices you have on AbpLinkUsers or any related table? And why getting all records on a paged page, shouldn't it fetch 10 records for paged page?

  • User Avatar
    0
    alper created
    Support Team

    @gizem can you pls test this case?

  • User Avatar
    0
    enes.koroglu created

    Hi @gizem

    Did you able to test?

  • User Avatar
    0
    gizem.kurt created
    Support Team

    I'm checking, I'll report the situation.

  • User Avatar
    0
    gizem.kurt created
    Support Team

    When I test it for 900 data, I see that the page can be opened without taking too long.

  • User Avatar
    0
    alper created
    Support Team

    hi @enes,

    in our tests, it loads very fast. but as I see, your DB fetch is much slower than our tests. I created an internal issue to improve this modal. we will make server-side paging on this modal and I hope it solves your slowness problem.

  • User Avatar
    0
    alper created
    Support Team

    In the meantime you can rebuild your DB indices or add missing indices see https://blog.sqlauthority.com/2011/01/03/sql-server-2008-missing-index-script-download/

  • User Avatar
    0
    enes.koroglu created

    Hi @alper my database is on the cloud and services are working on-premises so if there is too much round trip that may cause too much latency. And for 900 records 4.5 second is not also a good time. Is it possible to change fetching all records to fetching only current page records. And also could you please check if there is a loop for user or tenant info fetch?

  • User Avatar
    0
    maliming created
    Support Team

    hi enes.koroglu

    I will check it and see what we can do.

  • User Avatar
    0
    enes.koroglu created

    Hi @maliming

    Any news about this problem?

  • User Avatar
    0
    maliming created
    Support Team

    hi

    This query cannot be paged, because the data is actually a linked list structure.

    Can you share the full log of the link-user request with me? liming.ma@volosoft.com
    Please lower the log level to see more detailed logs.

    ##.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
    ##.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
    
  • User Avatar
    0
    enes.koroglu created

    Sent via mail

  • User Avatar
    0
    maliming created
    Support Team

    hi

    You can do some changes by https://github.com/abpframework/abp/pull/15892 the IdentityLinkUserAppService.cs file I sent by mail.

  • User Avatar
    0
    maliming created
    Support Team

    Please compare the performance after applying the changes. Thanks

Made with ❤️ on ABP v8.3.0-preview Updated on July 05, 2024, 15:13