Performance Profiling with Visual Studio - c++

How can I get Visual Studio to help me optimize my application, or tell me areas of slowness? Thanks

If you have Visual Studio 2013 Professional then you can use the Performance and Diagnostics hub: http://blogs.msdn.com/b/visualstudioalm/archive/2013/07/12/performance-and-diagnostics-hub-in-visual-studio-2013.aspx . This profiler is well integrated in the IDE and I've found it really quick and easy for spotting code hotspots.

If you have the super enterprise edition it's built in (but I haven't used it - and I think it's ability to profile unmanaged code is limited)
Otherwise see What's the best free C++ profiler for Windows?

As another suggestion, I have found the AMD CodeAnalyst a great companion. It integrates with VS2010 very well, and provides detailed breakdown of CPU time on a line-to-line basis. You can zoom in and out to see from a top-level to a function-level. Not to mention it even has in-line disassembly display if you need that extra bit of information!
Totally worth a try.

The Windows SysInternals website has a number of other useful utilities for network management, security, system information and more. Check it out. I’m sure you’ll find something of value.
Here is how it helped me:
Slow Visual Studio Performance … Solved!
I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or clearing Visual Studio’s recent projects list but those suggestions didn’t seem to solve the problem. I remembered that the Windows SysInternals website had a tool called Process Monitor that would sniff registry and file accesses by any running program. It seemed to me that Visual Studio was up to something and Process Monitor should help me figure out what it was. I downloaded the most recent version, and after fiddling around a bit with its display filters, ran it and to my horror, I saw that Visual Studio was so slow because it was accessing the more than 10,000 folders in C:\Users\krintoul\AppData\Local\Microsoft\WebSiteCache on most IDE operations. I’m not sure why there were that many folders and moreover, wasn’t sure what Visual Studio was doing with them, but after I zipped those folders up and moved them somewhere else, Visual Studio’s performance improved tremendously.

Related

Windows application crash .dmp file analysis in visual studio

To get the dump file (for crashes) I am using the userModeProcessorDumper.exe. Now the question is how to read this file (to see the stack information). Regarding this I have couple of questions
Yes I know I can use WinDbg (related tools) to analyze the .dmp file. My question is - Can this be analyzed in Visual Studio? To be more specific - I am having Visual Studio Enterprise Edition 6 - In this particular pack - can the .dmp file be opened for analysis.
If Yes, Please help me with steps.
I see in web advice to use Visual Studio 2XXX version. So I am feeling that the same cannot be done using VS Enterprise Edition.
The application is built on MinGW, even these application - can we analyze in Visual Studio (what ever is the edition - i.e Visual Studio 2XXX or VS Enterprise Edition X.Y)? Should I take care of any additional setting for this.
Any material link on this topic would be very helpful to me.
Thanks a lot in advance for your advice.
PS : My application is a C++ based application.
From what I remembered, VS6 cannot be used to debug dumps. It's been a while since I last used it, and trying to verify me memory I came across a workaround that might allow you to debug those dumps after all: Visual C++ 6, and post-mortem (crash dump) debugging.
I don't have VC6 at hand, and have no idea if this really works. Other than that, I feel for you... There are IDEs so much better than VC6. Hope this inability gives you the push towards an upgrade. Debugging dumps is really easy with VC7 and above.

Build Visual Studio 6 project without Visual Studio

I have inherited a Visual Studio 6 C++ project. The project builds fine in Visual Studio 6 but I failed to compile certain files in the project with a gcc compiler. These issues relate to forward declarations and probably other issues. For the mean-time, I'm not interested in fixing these problems since the code is horrible. The code is also windows dependant since it uses win32 to communicate with com ports.
So, I wish to compile with an ms compiler (and build and link...) but I don't have access anymore to Visual Studio due to company policy...
What options are open to me?
THanks for your help,
Barry.
You can try downloading the free (as in beer) windows SDK. It's been a while, but I believe that these low level tools, such cl, link and make are available though these.
http://msdn.microsoft.com/en-us/windows/bb980924
But you probably will need to massage the code a little, so you might need to deal with the win api a little bit too.
Just to clarify, this is free and not associated with VS, so unless your company has some rather restrictive policies, you should be able to download and use the Windows SDK fine. Furthermore, the compiler tools should be somewhat friendly to VS6.

Visual Studio 2010 (C++) highly unstable

We recently moved over to Visual Studio 2010 from 2005 and the environment have turned out to be highly unstable.
I experience 10-15 crashes per day at random locations , msenv.dll and vcpkg.dll to mention a few. It can be while selecting text or compiling, not found any pattern.
The plugin we got is VisualX Assist but I doubt that there is a problem with that.
Anyone here at Stackoverflow that experience this and/or know if there is any updates to apply to a default installed VS2010 ?
My Visual Studio 2010, without any plugins, was similarly unstable when I first installed it. I got updates from Microsoft Update, and it rarely crashes now. I never bothered figuring out exactly which update was key. It might have been a driver update, or an OS update, or a .NET update.
I'm running VS2010 10.0.30319.1 on 64-bit Windows 7. It's still slow, and it occasionally becomes unresponsive for a minute or two, but it doesn't crash very often now.
If you're up-to-date, and it still crashes, I'd be very suspicious of all plugins.

Developing Android applications with Visual Studio 2008

I've recently obtained an HTC Desire and I'm interested in porting my 3D engine to the device. I have a slight annoyance however. I'd love to be able to do development under Visual Studio 2008. Am I to assume I'm going to need to re-process my SLN files to do GCC builds? Its not a vast issue as I already have an application that processes SLN and VCProj files through GCC and then links them together at the other end. I'll just need to set up the right libraries with it.
Are there any other gotchas I need to think about? Or, indeed, is there an easier way?
Any info would be much appreciated!
Cheers :)
You will need to use your own or the NDK supplied build system. I believe Visual Studio can be set up to call external commands to build. You can of course use Visual Studio as the code editor, and call the NDK supplied make on the Makefile to build your application. You can't use Visual Studio as a debugger.
Im not used with VS. Using it to develop android apps sounds like pain to me. Main reason is that i dont think it got any plugins for android as Eclipse does. I guess you can use it as pure Java IDE (??), but still... building, editing and syntax hightlighting, code-autocomplete, etc etc... will be missing...
Follow the instructions on using Ant to do builds and you should be able to figure out how to make the VS build process drive your apps.
I don't understand the desire to use such a terrible code editor, but anyone trying to set up their IDE to build Android apps should start with the Ant stuff that they document.
Simply Put,
XCode + Eclipse + Carbide etc all cannot match the debugging environment of Visual Studio, GDB simply sucks our time.
These workaround tools just slow down the working process, to be honest working in xcode or esp eclipse seems like your thinking process is being overtaken by the management of bloatware that is required to manage the development in these forsaken IDE's. However Visual Studio development is more responsive and the IDE always seem to be prepared for any of your explorations
Regards
Bil

Profiler for Visual C++ 2005

Any recommendations for gratis (i.e. free as in free beer) profilers which can be integrated with Visual C++ 2005? I'm using Very Sleepy right now (which is really nice), but wouldn't mind shifting if there were a better option.
AMD CodeAnalyst is the best I've tried yet.
If you don't mind being a little unconventional, this costs nothing and works just fine.
Edit: you gotta work on your word choice. I missed the "gratis" there. Leaving my answer just because it is an amazing profiler.
If you want a serious solution, get Visual Studio 2005 Team Suite. Also note that the profiler has improved significantly with each new release (2008, 2010), but even in VS2005 it made others seem like half-hearted attempts. In my experience, it is the answer for profiling on the Windows platform.