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)
-
0
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.
-
0
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.
-
0
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.
-
0
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.
-
0
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; } } -
0
Hello
Thank you for your valuable suggestions.
I would appreciate it if you could kindly provide some additional clarification on the following points:
- Should the JSON file be split and organized in a more modularized structure?
- 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.
-
0
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.
-
0
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.
-
0
hi
- Can this slow problem be reproduced locally during localhost development? Because I couldn't reproduce the project with the project you shared earlier.
- If you fix problem 1, then you don't need care about the angular localization text case.
- 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.
-
0
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.
-
0
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.