Does Wing-IDE run in the background? If so, how slowly? - wing-ide

Does Wing-IDE run in the background? If so, how slowly?
I've been running a find-and-replace on basically a single line, for about 10 hours in the background, about 20000+ replaces have to be done.
Checking my CPU, and when Wing is not the active window, I'm getting reports that Wing is using 0%, usually and has jumps that get to about 0.2% at most.
But when I make it active, I'm getting 0.4% at a minimum, and hovering at 0.6% CPU...

I don't think Wing changes how it runs whether it's in the foreground or background, other than things like flashing the caret. I'm fairly sure your search/replace is either done or not working at all or it would be at 100% CPU. It could be a bug, and if so sending a bug report from the Help menu with the error log included might show us what went wrong.

Related

Visual Studio and WPF apps: High CPU usage when logged into other user

Observed behaviour (everything here is on Windows 10):
I run Visual Studio (tried 13 and 15, both behave the same) logged into user A
After starting up, VS takes virtually no CPU time (<1%)
I log into user B, without signing out of A
VS imediately starts using A LOT of CPU time (~25% on my 4 cores with hyper threading)
I can go back and forth between A and B, and it goes back and forth between low and high CPU usage
This is all without any projects or files opened, though it also happens in that case.
I noticed this because I was originally investigating similar behaviour of a WPF application (after a user reported this issue).
While trying to isolate the problem, I found that even a completely new WPF project, with just a single empty window, behaves exactly the same (whether or not run through Visual Studio).
Through profiling and debugging I found that the app seems to spend a huge amount of time handling windows messages.
Specifically I found that it seems to be almost exclusively WM_PAINT messages (we are talking easily hundreds or thousands of messages per second - as many as the CPU can handle it seems).
No other programs I have running (chrome, skype, sublime text, ..) behaves this way.
Has anybody else seen this kind of behaviour?
And/or any ideas what could cause this, or how I could investigate this further?
Naturally, I cannot fix Visual Studio (unless the problem is with my setup somehow) but I hope there is something I can do about my WPF application.
As per Hans Passant's suggestion in the comments, I reported this problem to Microsoft here:
http://connect.microsoft.com/VisualStudio/feedback/details/2390593/wpf-apps-use-a-lot-of-cpu-time-when-logged-into-different-user
As it turns out this indeed seems to have been a bug in WPF, which is fixed in the current version of Windows 10 (probably specifically since the Anniversary Update (version 1607)).
Hence the solution: Make sure to update your OS.

Dronekit-Python - Stop Mavproxy Downloading Logs

I am using Ardupilot in the plane and a Raspberry Pi running dronekit-python at the ground end across 3DR radio - with the Pi not controlling anything, just providing feedback to the pilot when they breach certain things like the boundary of a rectangular geofence (with increasing alarms the further they get out). So I am downloading only a few variables as frequently as I can (or as new data is available). Can anyone guide me on how to ask mavproxy not to automatically start downloading the whole tlog from the time it is started as I don't need it (other than for occasional debugging - but I can write my own specific log as needed)?
Edit: On digging further it appears to be invoked from lines 985 and 1031 of the mavproxy.py code (call functions set log directories, and write telemetry logs). Will comment them out and see what happens.
Further Edit: That works, once I worked out which version of Mavproxy was being loaded.
Gibbo
And from DKPY2 (just released) there is no MAVProxy dependency, so this should no longer be an issue.

How to determine which form, event, or method in WinForm app that's running to debug

This scenario has come up before and I'm wondering if there is any way I can determine where the actively running form is executing within code? The problem is when I inherit a very large application which I'm not totally familiar with yet and I have it running through VS.NET 2010. I might have a particular screen up and go "geeze it would be nice if I could start debugging when I do 'x'".
If this was a simple form with some buttons I wouldn't even bother asking here; I'm not that novice. But the time consuming task is when I look at a tabbed screen in a large multi-project solution with drag and drop capabilities, right click options, etc. and have to spend 5-10 minutes tracking down where to place a breakpoint to debug.
What I'm wondering is if there is a way to have the WinForms app running via IDE and do 'something' that tells VS.NET on the next action break into the code (obviously without a breakpoint because I don't know where to place one yet). This would save me a ton of time trying to track down which event is occurring in a not so simple form or series of forms.
I hope this makes sense...
Thanks!
Yes, that's somewhat possible. When you use Debug + Break All then the 99.9% odds are that you don't break into code that's part of the project. A Winforms app is normally idle, pumping the message loop and waiting for Windows to tell it that something happened. You'll break at the Application.Run() statement.
The trick to then use Debug + Step Over. The program resumes running like normal. Then give a UI command (do 'x' in your question) and the debugger will break at the first statement of real code, typically at the start of the event handler for that command. It isn't exactly guaranteed that that code would be relevant, you might break at a MouseMove event handler for example. So YMMV.

Debugging Silverlight in Visual Studio 2010 freezes when using keyboard

First I'd like to head off the "wait a minute" questions.
Yes, I've read every thread with similar titles and subjects on SO and beyond.
Yes, I'm using the very latest version of SP1 and any potential hotfixes that might be related to this problem.
So, with specificity, here is my problem:
When I'm debugging Silverlight applications and it hits a breakpoint, everything works just fine as long as I use the mouse. I can continue, step, stop debugging, disable and enable breakpoints all just fine -- as long as I do so with the mouse.
But when I use the keyboard, Visual Studio freezes for a number of seconds, sometimes over a minute. This is any use of the keyboard. But after a short time, it starts to work just fine until that debugging session is over. But the next debugging session (regardless of whether I use the same instance of Casini or not) it will do exactly the same thing.
When I say any keyboard use, I mean it. F5 (Continue), Shift-F5 (Stop Debugging), F10 (Step Over), as well as typing in the Immediate window or even hitting the ALT key to highlight the menu.
For instance, if I try to type something in the Immediate window, it freezes for about 15 seconds and then shows the first key and repeats the pattern about 5 times until it releases and everything is just fine.
When I say "freezes" I'm not talking just Visual Studio but it hangs the entire operating system except for my ability to move the mouse. Even so, the mouse cursor remains what it was when it froze regardless of the program it's over, such as the text selector.
It only happens with Silverlight and it doesn't matter which version I use.
Here's what I'm running:
Windows 7 Professional 64-bit, all of the latest updates included, 12 GB RAM & 1.5 TB HD.
Visual Studio 2010 Ultimate with all of the latest updates.
All software is legit and I've already tried removing and/or disabling just about everything that can be removed or disabled, including extensions. I've used Process Explorer from Sysinternals to kill or stop everything I can. I've also tried it on a very simple Silverlight application with nothing more than one line of code that doesn't access anything.
EDIT: Forgot to mention that I also don't have it loading symbols beyond the "Just My Code" that it normally would and I've tried every debug setting that I can think of as well. And Intellitrace is also turned off (since I do have Ultimate), but that makes no difference either.
UPDATE (11/18): It gets more and more odd. I determined that the temporary freeze doesn't occur only when Visual Studio has focus. When VS (during the super-simple Silverlight app) goes into debug mode, any keyboard access AT ALL causes the same effect. SO, it appears that it has to (in some way) be related (at least in part) to my Windows setup, contrary to my assertion in the comments, but I cannot possibly fathom how. And if other programs are doing something when it freezes, the delay is longer (which makes a certain amount of sense with the symptoms). I'm still at a complete loss.
Anyone have any ideas or see this before? It's really frustrating.
I solved the problem.
It turned out to be the LastPass toolbar. It's a very handy thing and I've used it for years without issue. Yeah, yeah, toolbars are evil, I get it. :)
Disabling it in IE fixed the problem completely. I can still use it in FF (which is my main browser anyway except for working for which I use IE) and everything works fine.
Even so, it's bizarre to me that the toolbar would only have an effect when SL debugs. I didn't have an issue with ASP.Net debugging and I didn't any issues when the SL app was actually running, only when I hit a breakpoint AND hit a key within the first 15 seconds or so.
In any case, problem solved and thanks for your suggestions.
Try changing registry setting LowLevelHooksTimeout from 5000 to something low, like 300.
It can be at
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\Control Panel\Desktop
or
HKEY_CURRENT_USER\Control Panel\Desktop
(first setting at Policy key seems to globally override user setting).

Running project with debug takes extremely long to load

For some reason, my Silverlight project in VS2010 recently started to take forever to load, upwards of even 10min or so. Sometimes it won't ever load as far as I can tell, and just hangs on the silverlight loading screen with the blue dots in a circle animation. But before it even gets to that point, it painfully spends a solid 10 seconds or so for each symbols file it loads. So in the output I'll get:
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded.
Then 10 seconds later I'll get the next one, and there's about 50 of them. The weird thing is that when I run the project with my internet disabled, it loads extremely quickly. Each one of those symbols loaded statements flies by, and before I know it I'm looking at my running Silverlight project. My teammate things it might have to do with Perforce, which is how we manage our source, and which we have a plugin for in Visual Studio.
Anyone have any ideas what could be causing this? Or experienced a similar phenomenon once? It randomly started yesterday.
Thanks!
Edit: I'm using the built-in VS Server to host my project, if that's relevant.
Resolved: We don't know exactly what caused the issue, but it was network related and fixed itself. I just hope it doesn't happen again.
You might be downloading symbols from MSDN or some other server. Check Option -> Debugging -> Symbols and make sure you don't have any locations active.

Resources