Blazor server High CPU Usage - windows

Am experiencing a serious issue on cpu usage on blazor web app,the app is small.CPU usage is a high as 93%.I need some Assist on the cause of this high usage.Am using syncfusion components.This is happening when app is not even running.

I Think it's not a problem of blazor, it's VS2022, you specific when the app it's not runing, i experienced something similar and just change my project to VS 2019 and solved my problem, unfortunately, vs2022 it's not optimized for some CPUs, and you have the usage of the cpu on your ide, not the services!

Related

Emulate low physical memory in Visual Studio

I am attempting to debug a performance problem that a customer is experiencing by reproducing it in-house. We suspect that the problem is that the customer has a small amount of physical RAM and the program is paging to disk. This is causing very slow reports.
Is there a way to get Visual Studio to emulate this behaviour when I debug? I would like to closely reproduce in house what I have seen at the customer so that I am sure that I am actually fixing the relevant problem.
Using Visual Studio Enterprise 2015 (14.0.24720.00 Update1)
with ReSharper Ultimate 2015.2 (103.0.20150818.200216)
I would suggest creating a Virtual Machine for this, you will then be able to specify exactly the amount of memory/CPU that the machine is to have. The OS will see this as physical limits, so you will be able to tweak it up and down easily without having to build/reinstall any OS (but would need to restart VM most likely).
For this kind of thing I use the free version of VMware Player, which will happily build a VM from install media.
HTH

How to measure building and lauch time

I'm developing a Sitefinity application and it is quite slow to launch it. It can go from 3 to more than 10 minutes.
So I would like to know if there is any tool to measure the time the visual studio spends launching an application, see graphics, and other data.
I'm using visual studio community edition 2013
You can use JustTrace and profile the w3wp process that Sitefinity starts in your IIS (provided that you have hosted your Sitefinity application in IIS).
Alternatively, if the problem is not reproducible on your local environment, you can try with NewRelic. I've foudn some pretty good insights while debugging performance problems using it.
This was quite unexpected but the problem was on the charger that was given to me. It hadn't enough power, so it took much more time to charge and the whole computer were slower including (launching the application). If I used the laptop without the charger(battery only) the launching was much faster. So I changed the charger and now it takes 1 to 3 minutes lanching sitefinity.
thank you for the suggestions though.

Visual Studio 2008 Hangs

Visual Studio 2008 hangs a lot on my machine. I work in an team environment using Team Foundation Server and when the server has issues VS hangs forever, sometimes if I have two instances open one of them will hang even if TFS is working. I try to disconnect from TFS and work offline but even that hangs my VS. Is there any way to make VS more responsive in case TFS is down?
I have a quad core i5 CPU, 8gb ram, and am running locally (not in a VM).
This might help you set VS to work offline and should help with the server timeouts. Also kick the sys admin of your TFS server, it shouldn't be that unreliable.
Sometimes this is caused simply because the TFS dialogs appear off-screen and it appears to hang. If pressing Esc "unfreezes" Visual Studio, then this is likely the problem.
I found the solution at: http://www.imiscommunity.com/visual_studio_2008_hangs_tfs_compare_dialog_not_visible
TFS can be a serious nuisance when developing a solution that is used by many team members. Without knowing more specifics about your setup, I would ask a few more questions:
What is your machine spec?
Are all other developer machines the same spec? Do they experience the same kind of issues?
Have you tried watching the CPU and Memory usage in Windows Task Manager to determine the amount of resources being used?
In summary, I have found that this can often be down to a number of reasons. As a contract developer, I have to use many different systems from the latest desktop with 12GB of RAM and an i7 processor, through to Virtual Machines on a server (my preferred choice because it is scalable and easier to snapshot), down to using older machines that are insufficient for the task (one of the distasteful parts of the jobs is having to request an upgraded machine).
I suggest reinstalling you development environment from scratch, including operating system and everything. Make sure the hardware is the best you can get, and install on a virtual machine instance on that development machine. That way you can take incremental (albeit slightly large at a fair few GB) backups that will prove handy should you come across an issue.
BTW the most common problem I had was with Visual Studio plug-ins on a system that lacked sufficient RAM. ReSharper was my biggest offender as it compiles regularly in the background in order to highlight bugs - but personally I would not code without it now.

Resharper 5 - are speed & memory bloat issues solved?

I am on Resharper 4.x and VS2008.
R# seems to slow down the living crap out of VS2008. And of course, the memory usage can easily go to 500MB on a middle of the road Winforms solution with 7-8 projects.
Now that Resharper 5.x is out, can anyone tell me whether either perf or memory issues have been improved for use with VS2008?
I believe R#5 memory usage is better than the earlier versions but still too slow for me. I'm using it with VS2010 on a decent machine (quad core, 7200rpm HDD, 4GB ram). Using a solid state drive might help.
It is faster, and not so hungry for RAM, but I have tweaked its code inspection a bit.
I am on Resharper 6.1, and there are still OutOfMemoryException issues. JetBrains claims this is an issue with Visual Studio process fragmentation.
http://confluence.jetbrains.net/display/ReSharper/OutOfMemoryException+Fix

Anyone Experiencing Slow Builds With VS2010?

We've recently upgraded to the final release of VS2010 and are experiencing very slow build times compared to the same code under 2008. I was wondering if anyone else is experiencing the same so I can work out whether it's just our environment or not? A few details:
Using VS2010 Ultimate on Windows 7 with fairly beefy machines, talking to TFS 2010.
The solution has been upgraded from VS2008 but still builds against .NET 3.5 and ASP.NET MVC 1.0.
It doesn't seem to be the compilation itself taking long but something else in the build process. This is because even projects that are up to date and don't need compiling are taking a few seconds or so to process.
It's not due to an Visual Studio addin because a couple guys in the team haven't installed any.
The first build after loading VS2010 is pretty quick, then they seem to slow down over time. For example on of the projects in my solution just took 00:00:00.08 to process after a restart. (The project was up to date and didn't need compiling) I then immediately hit rebuild and it jumps to 00:00:01.33.
We're also experiencing the problem with another solution that uses .NET 4.0 that was building perfectly fine under VS2010 RC.
There are no build events or anything like that I can blame, just straightforward assembly builds.
The IDE is not very responsive during the slow builds.
Anyone else has similar problems?
Update: It looks like the resolving assembly references is taking a long time. Looking at the MSBuild diagnostic output or the example above the first build has 30ms for ResolveAssemblyReferences, the second build has 800ms. Subsequent builds seem to be taking longer copying stuff around, e.g. CopyFilesToOutputDirectory jumps from 1ms to 27ms.
Found the problem; turns out it was a rogue build task causing the problem. In my MVC website project I was using the YUI Compressor task from http://yuicompressor.codeplex.com/ to compress my script files and copy them over to my JavaScript unit test project. Everything was fine until this ran, but as soon as it ran it slowed down builds of all other projects! Even rebuilding single projects in the solution and going nowhere near the MVC website were slow. Must be a leak in the task or something like that...
I'm also experiencing extremely slow responses generally from VS2010. I can type in a phrase, sit back and watch it typed out onto the screen a couple of seconds later. Using it's internal web server is extremely slow even when not debugging. It's unusable.
Running it on Win7 Professional x32, with a web project built on .NET 4.0, converted from .NET 3.5 on VS2008 which ran fine but was when I was using W2k3 as my development machine to keep the speed up.
All these are run as virtual machines using the latest version of VirtualBox (currently V3.2.8 r64453) on Linux Ubuntu 10.4 x64 on a massive machine. 2 x Intel i7 2.8GHz (8 virtual cores), 12GB RAM, NVidia 9600 GPU with 512MB RAM.
VM is set up to give 2 cores to Win7 and 4GB RAM and 96MB Video RAM. VT-x, 2D & 3D Acceleration and Nested Pages are enabled.
VS2010 has been tried with and without Hardware Acceleration (as it uses WPF to display it's text editor! [why???]). With, you lose the text editor and menu bars; without, you get a barely usable system. I also have Reflection and Visual SVN installed. The machine is used for nothing else. Anti-Virus is run manually to keep the load down!
[Rant Warning:]
VS2010 runs like a dog and if it wasn't for the fact I've spent 11 months on this project for a client I've been working for for 7 years, I'd be redeveloping in PHP on responsive tools. I left M$ OS's for my business OS 2 years ago precisely because of freezes, slow downs and inexplicable changes taking weeks out of my productivity. Cost wasn't the issue, it was service.
[Rant Over]
I'm aware there are 3 items to this, VirtualBox, Win7 & VS2010. It may be best for me to set up a Win2008 server VM and install VS2010 on that, I don't know at this point.
If anyone has any clues how to get VS2010 to respond in a timely fashion I'd love to hear them.
Craig
I had some extremely slow build times on a solution that included an MSUnit project (with only about 5 tests in it). The tests were not set to run on each build or anything like that. When I unloaded the project, the build became much quicker.
Just for anyone's sake. I had slow compilation times because of an extension, disabled extensions and 10 x more speedier (probably a bug in one :s)
I had the same problem one week ago. Reinstalling .NET 4 framework helped me.
Had the same issue, solved it by changing my default browser from IE to Chrome.

Resources