Web App taking high CPU when I am loading a particular web page.

jasmeet ghai 0 Reputation points
2025-02-22T08:41:17.0033333+00:00

My web app CPU going high when I am uploading a web page while the copy of uploading page working fine without any issue of CPU.

Actual Page = mpn
Page Copy = mpn1

I don't know what's going on

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
396 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Nair 735 Reputation points Microsoft External Staff
    2025-03-10T21:43:13.1866667+00:00

    Hi jasmeet ghai,

    The original page (mpn) might have some differences in its code or resource loading compared to the copy (mpn1), which could be triggering the excessive CPU usage. Sometimes even minor differences—such as an extra script, an additional event listener, or a subtle change in the DOM structure—can lead to performance issues. It would be beneficial to compare the HTML, JavaScript, and CSS of both pages using a diff tool to identify any discrepancies.

    It is important to analyze the JavaScript performance on the mpn page. Profiling tools can help you record a CPU profile while loading the page. This may pinpoint specific functions or scripts that are consuming an abnormal amount of CPU. Heavy DOM manipulations, repeated reflows, or repaints might also be contributing factors that you can detect through such profiling.

    check if, mpn page is loading additional third-party scripts or resources that are not present on the mpn1 copy. External libraries, analytics, ad scripts, or even differences in the number and size of images, fonts, or other assets could increase the load on the CPU. Verifying that both pages are requesting the same resources can help narrow down the issue.

    Once review any server-side processing that might be happening when the mpn page loads. For example, if the page triggers more complex API calls or database queries compared to the copy, this could contribute indirectly to higher CPU usage. Checking server logs or monitoring tools might reveal discrepancies in behavior between the two pages.

    Profiling tools- https://learn.microsoft.com/en-us/windows/apps/performance/choose-between-tools

     https://learn.microsoft.com/en-us/dotnet/core/diagnostics/debug-highcpu?tabs=windows#cpu-counters

    https://learn.microsoft.com/en-us/azure/app-service/app-service-web-nodejs-best-practices-and-troubleshoot-guide#scenarios-and-recommendationstroubleshooting

    If you have any further assistant, do let me know.

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.