Open Closed

Slow initial application load #10447


User avatar
0
BOMSDevTeam created

Hello Team

I am experiencing a noticeable delay during the initial load of the application. When I open the web application, it takes a significant amount of time to render, with the first response taking approximately 20–30 seconds.

Additionally, when I click on any page or module for the first time, the response is slow.

Could you please help identify the cause and suggest ways to reduce this first-load delay?

Thanks


36 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This may be related to the performance of your web server, cache server, or database.

    This means it's not a code issue, but rather a problem with the runtime environment.

    If the slow no longer occurs after disabling Redis, then it's clear that the issue is with Redis.

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    Hi,

    I have a question regarding localization. Why are we receiving all the localization JSON files even before user login? Could you please suggest an approach to prevent loading all localization data without authentication?

    Thank you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Private/confidential data will not be included in the localization texts.

    Some of your open pages may also use localization texts. for example: login/register pages.

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    Yes, private data is not included. However, as the product grows, the JSON size will also increase.

    The Login and Register pages are served from the Auth Server, which is an MVC application, so I don’t think an API call is required for that.

    It would be better to have proper control over when and where this API is called to retrieve localized text.

    Thank you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can create a new localization text endpoint and add a resource name to filter the texts of a resource.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/IAbpApplicationLocalizationAppService.cs#L6-L9

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationLocalizationRequestDto.cs#L5

    public class ApplicationLocalizationRequestDto
    {
        [Required]
        public string CultureName { get; set; } = default!;
    
        // eg: AbpIdentity
        public string Resource { get; set; } = default!;
        
        public bool OnlyDynamics { get; set; }
    }
    
  • User Avatar
    0
    BOMSDevTeam created

    Hello

    Thank you for your valuable suggestions.

    I would appreciate it if you could kindly provide some additional clarification on the following points:

    1. Should the JSON file be split and organized in a more modularized structure?
    2. My primary goal is to reduce the API load time before the user logs into the system. Currently, the default API call initiated from the ABP code sometimes takes around 30–40 seconds to respond. Could you please advise on how we can prevent or optimize this default API call?

    Thank you in advance for your guidance.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I think your slow problem is probably not related to returning all the JSON, because a delay of 30-40 seconds is unlikely to be caused by that.

    It's most likely that the delay was caused by the database or cache server.

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    I completely understand your point. However, I have already disabled Redis, and the database server load is almost zero. In most cases, the application loads quickly, but occasionally the page still takes some time to load — and this happens before the user logs in.

    Since I am directly redirecting the user to the authentication server before login, I am considering whether this particular API call is actually necessary at that stage. It seems we may not need to trigger this API before the user is authenticated.

    I am open to splitting the en.json file if required. However, I am not entirely sure how this approach would work consistently across other languages. I would appreciate your guidance on how best to handle this scenario.

    Thank you for your support.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    1. Can this slow problem be reproduced locally during localhost development? Because I couldn't reproduce the project with the project you shared earlier.
    2. If you fix problem 1, then you don't need care about the angular localization text case.
    3. If you have disabled the Redis and dataabse also no problem. Then you can enable all debug logs (including EF Core) and reproduce the slow problem and share full logs.txt.

    https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems

    var loggerConfiguration = new LoggerConfiguration()
        .MinimumLevel.Debug()
        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Information)
        .Enrich.FromLogContext()
        .WriteTo.Async(c => c.File("Logs/logs.txt"))
    

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    Hi

    Currently, these two API calls are being triggered twice — once before login and again after login.

    Since we do not require these API calls before the user is authenticated, could you please suggest a way to prevent them from being executed prior to login? I will also review the logs from my side and share the details with you shortly.

    Thank you for your guidance. Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This is not a problem, one request is anonymous and the other is authenticated. This is by design, and when you solve the slow problem, this is no longer a problem.

    Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.3.0-preview. Updated on March 13, 2026, 12:51
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.