Skip to content

Core 3.1, UseReactDevelopmentServer middleware & Performance #19052

Closed
@yahorsi

Description

@yahorsi

Hi Guys,

We recently have started working on the new .NET Core 3.1.1 & React SPA.
In order to start, we have created the app from the template (.NET Core Web Application + React) and noticed that some request that gets proxied to the node takes longer than they should.
The only change in the template we made - we have disabled https redirection and open the local site using just HTTP. As you see on the screenshot, sometimes requests that's get proxied takes about the second and sometimes they are fast. NOTE: Press F5 several times

image

If we run the site using exactly the same command as used by the UseReactDevelopmentServer - npm start, that runs "rimraf ./build && react-scripts start" we will see following timings:

image

Things start working very very fast and that is really noticeable for the developers working on the frontend as frontend needs to reload on the change.

So, my wild guess is that there is something wrong happening in the middleware that is proxying calls to the node.

I have uploaded the app I was using here https://github.com/yahorsi/ReactDevServerMiddlewarePerf

PS1: I have also noticed that it seems when you stop C# app - Node is not stopped and so, after a while you have a LOT's of node instances running
PS2: Seems template needs to be updated as after the start it complains that npm update needed
PS3: Running in the release configuration does not solve the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: DuplicateResolved as a duplicate of another issueStatus: Resolvedaffected-mediumThis issue impacts approximately half of our customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.feature-spaseverity-majorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions