baer999
baer999

Reputation: 972

Optimize Server Side Blazor application

I've try to improve performance of a server side blazor application and got a result from Google Chrome Lighthouse, which shows very much work in parsing / Script Evaluation.

Has someone experience if this is normal in with server blazor or how to improve this thing in production mode?

enter image description here

Just want to know some hints or experiences which part of application could cause this behaviour.

Thanks!

Upvotes: 2

Views: 712

Answers (2)

rdmptn
rdmptn

Reputation: 5603

Also, make sure you have prerendering on.

Then, see what scripts you can shave off, especially jQuery widgets. Load scripts on demand when you will be initializing then only.

Upvotes: 2

Peter Morris
Peter Morris

Reputation: 23234

With server side blazor the browser just acts as a dumb terminal. Whenever you set a DOM event @onclick @onmousemove etc or is sent back to the server by some javascript. The server deals with the event and then the javascript receives delta html to update the body.

If you can, avoid events that occur regularly such as @onmousemove, use the default binding settings rather than every time a key is pressed etc.

But basically, expect a lot of time to be spent on javascript because javascript is the basis of the whole experience.

Upvotes: 2

Related Questions