My Visual studio 2013 typing and scrolling is slow. What Can i do? - plugins

I'm Currently working on Visual studio 2013 (MVC 5). Since few days I'm getting a problem with typing and scrolling, database is connecting slow. But all working fine but slowly.
Problems:
When typing a letter that keyword display taking long time and some
times not displayed.
Scrolling the solution explorer does not response correctly.
Connect the Database is not showing the connection string.
I searched on the internet and found smooth scroll plugin. After installing that it worked for some hours only after that getting same problem

Apart from Visual Studio 2013 Update 5 which will play an important role here you can also check other solutions listed below.
For smooth scrolling you could try the below steps :
For smooth scrolling install this extension
In VS Go Tools > Environment > General.
My Install had the "Automatically adjust visual experience based on client performance" checked which was using software-accelerated rendering. I unchecked this and checked "Use hardware graphics acceleration if available".
Restart VS
Slow building, debugging, navigating ?
Why is VS 2013 very slow?
More references :
MSDN

You need to check two things: CPU load and drive load. Open the Task Manager and observe the CPU load to determine if the problem is due to the CPU is being overloaded. Watch the HDD LED to see if it flashing rapidly or on and solid to see if the problem is due to the hard-drive is being thrashed (and thus overloaded). Both can cause this symptom. If you find either to be the case, then your next step is to figure out why the system is being burdened.
if 0% CPU and 0% disk. But any text editing heavily lags? Must be due to some sort of plugin or something. I know the CodeLens, Insights, and Microsoft Git have had issues reported with slow IDE response.
Also try disabling Synchronized Settings in VS. Go to Tools -> Options -> Environment-Synchronized Settings and remove this option by un-checking the check box.

Update your Visual Studio get working normally.
https://www.visualstudio.com/en-us/news/vs2013-update5-vs.aspx

Related

Generally what would cause Unity Editor freezes and not responding?

I have encountered a critical issue that Unity Editor freezes. I've spent many hours debugging step by step of my codes but still can't find where the problem is. So I think maybe I should try thinking from another angle, generally speaking what reasons would cause Unity Editor freezes and not responding?
I can't find a general case discussion about this topic.
From my experience, infinite loop is one reason for sure. Deadlock is critical issue, but not sure if it causes Unity Editor freezes. Unity Editor bug that I encountered only makes the whole editor crashes, instead of freezing. Any other experiences are welcomed. Thank you!
In such case, what kind of tools or methods could I use to debug it? Right now since the editor freezes I can't use "print" to find out what happens after it freezes. So I use Visual studio to debug the Editor thread, in this way I can see all the prints that I wrote. It appears the game is still running, only the editor not responding. And I can use VS click "attach to Unity and play" and put some debugging points, then debug step by step.
The first thing that I would check out is for an infinite loop. At the hang/freeze moment, you can attatch the debugger of your choice and pause the execution. In the case that it is an infinite loop that it is executing, at the exec time pause you might find the execution in a forever running while (true) {...}
Other thing that I would check is the plugins in use. Several Unity plugins like Parse, FMOD, UMP (Universal Media Player), ZFBrowser, or Embedded Browser are using native threads. It’s an issue when a plugin ends up attaching a native thread to the runtime, which then does blocking calls to the OS. This means Unity can't interrupt that thread for the debugger (or domain reload) and hang. Source
To check that you can check the active threads in the visual studio command window af the freeze is reproduced:
View->OtherWindows->CommandWindow and type in this command:
Debug.ListCallStack /AllThreads /ShowExternalCode
In the stack you can check if some thread is there with no need, or if its related with the plugins mentioned above.
Also an interesting point is to check in the windows task manager (in the case that you are using windows) if the CPU usage is to 0%. It can lead you to the type of hang that is taking place.
Good luck.
Edit: I forgot to mention, you need to check also the unity logfiles
I notice this all the time, and its super frustrating.
Unfortunately, this could be any number of issues. I notice this issue most often when working in projects that are made for the Universal Windows Platform.
Try using the Task manager to monitor specific processes / threads running.
Some follow up questions:
What platform is your project currently targeting?
What version of Unity are you running? Have you tried other versions?
What are your computers specs? Is the OS up to date? Graphics Drivers?
Does it happen (or happen more often) when an external code editor is open? Perhaps try going to Preferences>External Editor > Regenerate Project files.
Are you using Unity Collab by chance? I've had issues where collab is stuck trying to communicate with Unity Servers / looking for changes. Try logging out of your Unity account through the editor, and log back in.
Have you tried looking for a Unity editor crash dump, or error log files? I think they can be found here C:\Users\username\AppData\LocalLow\Unity by default. Those files may give you more specific data concerning your problem.
Unity's new versions are getting more slower and slower. From my experience 2019 versions are the best and more stable.
I solved my issue. It's fundamentally an infinite loop.
It's not a simple case such as "while(true)". I'll try to explain.
My game was a PvP game, and I'm making a local AI. Usually my design pattern works fine, however I just turned off the simulation of "AI thinking time", and since the AI codes and server codes all run in local mode, the transmitting of data between server and client are replaced by local method call(meaning instantly executed before everything else).
There is a loophole in my server code. I use "Update" and a flag on server to change a specific game state, however in this particular case, it got into an infinite loop because the local method call is executed before the "Update". And because my AI now doesn't need real time to "think", it "acts" and transmits the event data to server right away. And since the transmitting doesn't need time any more, it calls the server method instantly, hence forming the infinite loop.

Typescript & Javascript language features extension in VSCode causes my laptop to overheat

It's been like a month since I started using VSCode and I like it.
However, The problem is the moment I launch the program the laptop's fans start to make relatively loud sounds so I thought because there were multiple programs running at once but after trying to launch VSCode alone the problem remains untacked.
Here's what I've tried so far:
Disabled the gpu accelartion.
Disabled all the built-in extensions except the Typescript & Javascript language features extension (I didn't install any additional extensions)
Tried clean install.
Nothing worked, But when I tried to disable Typescript & Javascript language features extension the fans started to cool down. I even checked the system monitor. The reading of CPU usage for VSCode before and after disabling the mentioned extension
It jumped from 0% to 28% to 30% to 16% and keeps bouncing between 9% and 16% for as long as the application is running.
I know it seems obvious to disable this extension and I'm good to go but I need it, I mean the whole point of me using VSCode is this extension. Did anyone run into the same problem or it's only me?
P.S: I'm using Ubuntu 18.04 LTS.
So after decades of research this guy's answer solved the problem.
All you have to do is to open VSCode then File > Preferences > Settings then type the following in the search bar typescript.disableAutomaticTypeAcquisition then check the checkbox and you're good to go.
However, autocomplete is not working for some imported packages so be aware of that.
Anyway, I opened an issue long time ago if anyone wants to follow any new updates about this topic here.
Go and give this guy's answer a thumbs up or love because he deserves it.

How to investigate VS Code taking 30% of CPU although it is supposed to do nothing

My CPU is oscillating between 20 and 30% usage for CPU usage based on Windows Task manager. it is occurring for several hours now.
I expect this VS Code instance to do nothing.
How can I investigate what is going wrong?
I tried to open "Developer: Toggle Developer Tools", then go to performance tab and record. Unfortunately it is reporting that most of the time is in "idle" (which is what I would expect)
(I also tried to ask on Twitter without success https://twitter.com/apupier/status/1100348567926071296)
regards,
Based on the comments it seems that what the Task Manager reports is the total use of VS both on CPU utilization and memory.
A broad range of reasons could explain the observations you made.
1.Increased CPU and Memory usage by VS Studio.
2. Increased Fan Speed.
3. Your code being idle.
It can be the case that the VS Code or one of its plugins is actually doing something even if you do not actively use it. For sure if it is opened, even without being used the program will use some memory.
You can find more information on the CPU usage per VS Code Extension by typing: code --status in the command line. You can also try to execute: code --disable-extensions to run VS Code without any extensions to see if the CPU/Memory usage is reduced.
Results of the code --status will look like this
There are some related issues you could also see in GitHub, I checked before writing this answer:
100% core CPU usage without apparent reason
Excess CPU usage
Excess CPU usage editing C file
It is usually an extension. E.g. Python Intellisense. It is perhaps outsourcing processing for some scientific project aimed for the good of humanity. Fingers crossed.
Update 2022:
Earlier you could find them easily with VS Codes builtin Process Explorer. Help > "Open Process Explorer."
But the newer versions are very sneaky. They seem to have evolved making them difficult to catch while stealing your cpu. Disclaimer: the behavior may very well be even an unintentional glitch although it does not appear so.
Can you catch it in action?
Its as tough as catching a fly. As of Feb 2022, the moment you attempt to probe into the cpu usage either via vs code "help/Open Process Explorer" OR sometimes even win task manager, it stops/vanishes like a fly. Then it stays inactive for some hours or a day. You forget about it and get busy coding only to find the fans are going crazy because it has sneaked in to be active again. The newer version of the bug is perhaps programmed as such.
None the less with a lot of patience, you can sometimes catch them. Here is one instance and yet it vanished before i could scroll to catch the name.
VS Code Process manager
Solution:
I don't have a reason to probe it beyond a limit, but a small monitoring script should be able to catch the culprit.
Personally, I just had to remove the "Python extension for Visual Studio Code (Python IntelliSense - Pylance)" and that was enough to resolve.
IDE's a notoriously expensive to run. As soon as you open VS Code it loads the program from your hard drive, into RAM; acting as a staging point for all the processes VS Code uses to manage its environment. Things like,
Overhead of the Electron framework upon which it is built
Checking for external file changes that need to be synchronized to the editor
Render pipeline
Child processes to support any extensions you have running
Terminal instances (and by extension anything running in those terminals)
Here's a nifty little extension I found after some quick Googling. It will show you the subprocesses running in VS Code, and may help you identify exactly what is taking up the most bandwidth. Do keep in mind, that by killing some of those processes, you may begin to lose the associated functionality, and indeed possibly even cause VS Code to crash. The only sure-fire way to keep it from taxing your CPU, is to shut it down completely when you're not using it.
Perhaps you could try out another IDE like Sublime, IntelliJ, or Atom and see if they act more as you expect when idle. Personally, I really love the features of Jetbrain's IntelliJ (and similar: Webstorm, PhpStorm, etc).
I got the same problem. It might have something to do with the git operations. You might have DELETED many projects from your current folder, while git didn't register the deletion.
When you do something with the changes, git operations will use a lot of CPU.
The simplest solution is to create a new folder and start running VSCode in it. You can delete the whole old folder, or you can leave it alone. It's up to you.

Why does VS Code require so much memory? How can I make it run more memory-efficiently?

Does anyone know how to make VS Code use less memory?
It´s taking more than 2gb, sometimes more than 3 gigabytes to have some 8 files opened.
I'm on the VS code team.
There are many possible causes for high memory usage. We've put together tools and a guide that can help you investigate potential performance issues.
Start by using the process explorer. The process explorer shows the cpu and memory usage per child process of VS Code. Open it with the Open process explorer command. The process explorer should help you track down which processes are using the most memory. Often times, an extension will turn out to be the root cause
Also, even though you have only opened eight files, your workspace seems to be quite a bit larger than just those eight. Providing intellisense and other advanced editor features often requires processing many unopened files as well. Whether or not the 2-3gb is justified or not is hard to say without understanding what extensions you are using and what your workspace contains.
I recommend that you also take a look through the rest of our performance issue guide. It explains how to report performance issues and further investigate performance problems.
You could prevent vscode from watching folders with really many files in you project by adding this to your json settings file
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/node_modules/**": true
}
It's because VS Code isn't a native program like Vim, Emacs, or even Sublime. Opening VS Code is like opening another Chrome window, it uses a lot of RAM, and CPU.
Neovim uses around 10 mbs of RAM (with some plugins), while vs code uses 700 mbs of RAM, with no file opened
Because VSCode is built on top of Electron, so under the hood it is just the same as web browser.
If you need more lighter memory use Sublime Text or Notepad++ instead
Check if your extensions are causing the bad things
I have used the guide https://github.com/Microsoft/vscode/wiki/Performance-Issues#profile-the-running-extensions
to know why VS Code was
very slow to startup
taking much ram (3-4 gb)
You can create a CPU profile and share it in the issue with the extension author or us. To create a CPU profile:
Close all instances of VSCode and start with code --inspect-extensions=9993 or any other port number.
Execute the Developer: Show Running Extensions Command. This command opens an editor with all the running extensions. To start recording a profile
I found some extension with high delays and they were marked with unresponsive yellow triangle. I disabled them using right click context menu, restarted VS Code, and after that it
Takes only a few seconds to startup
Takes only ~250mb of ram
Not an actual solution, but launching VSC via code ./ --disable-extensionscan do so without requiring to manually disable all of them.

IE11 F12 Developer Tools on Windows 7 functionality missing/not working?

I was using IE10 on Windows 7 but it is such a buggy piece of you-know-what (hanging, crashing, etc.) that I gave up and installed IE11. It has not hung or crashed since installing. But I hate the F12 developer tools! Okay, not completely - there are some very cool new features. What I don't like is that they seem to have dropped several features that I really liked! Unless I'm just missing something... I've searched and searched on Google and Microsoft but all of the help I've found only describes the new features. Here is what I'm missing: Color picker, Ruler, and most of all, the Clear browser cache for this domain. They allege to have a Clear browser cache function, but it doesn't work! So when I make changes to my website, in particular changing graphics, the only way I can see the change is to delete all my temporary files from IE. Then I lose all of my cookies e.g. for automatically logging in to Stack Overflow! IE version 11.0.9600.16428 on Windows 7 Ultimate 64-bit.
The color picker is still available, go to the DOM Explorer tab and there is an eye dropper on the tool bar at the top towards the left. That activates the color picker.
For the issue of serving cached files try toggling on "Always refresh from server" on the network tool (3rd option from the left). This should get you the latest changes from your server.