Why does a css file embedded in a DLL take 50.9ms to 9.4s to load?

David Thielen 2,956 Reputation points
2024-07-20T22:36:36.99+00:00

Hi all;

I have a Blazor server app running on Azure app server. I am using Application Insights to measure performance and as I am new to Application Insights, this may be a user error.

I have MudBlazor referenced in App.razor as:

<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />

I believe this means it is reading it out of the MudBlazor.dll which is a local disk read from a local file.

Application Insights shows the time for 'GET /_content/MudBlazor/MudBlazor.min.css` to be, in order: 9.4s, 1.6s.153.9ms, 50.9ms.

These times are, I believe, the server responding to a client browser that is requesting it. These are all the same browser.

My question is why so long? Even 50.9 strikes me as high for something embedded in a local file. (A separate question is why is the browser re-requesting the file. But that's a distinct issue for another question.)

thanks - dave

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,547 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 63,501 Reputation points
    2024-07-22T16:04:04.9633333+00:00

    in the standard configuration the static file handle would return the file. this should be quick, so my guess is that you have caching turned off in the browser, and your requests are going to different web servers (not over the keep alive session - check with browser debug tools). and the delay is the server spinning up.


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.