locked
I have VS express. My program is very slow. How do I find functions that are at fault? RRS feed

  • Question

  • I have VS express which may not have all the debugging tools that the full version of Visual Studio has.  My program is very slow.  How do I find the functions that are at fault?

    Thanks.

    Friday, June 5, 2015 2:27 PM

Answers

All replies

  • Hi malikmeister,

    Could you please tell me what version of the VS Express you install on your machine, is it related to the VS Express for Windows Desktop or other?

    What kind of the application you create in the VS Express?

    As you said about your program is very slow in the VS Express?

    To check if the issue is related to your program or the VS IDE, I suggest you could try to create a new simple program and then debug it check this issue.

    (1) If you still get same issue, I suggest you could try to debug your program in the VS safe mode and then check this issue.

    https://msdn.microsoft.com/en-us/library/ms241278.aspx?f=255&MSPPError=-2147217396

    Or you could try to reset the VS setting file by going to the Tools->Import and Export Settings and then check this issue again.

    (2) If you just get the issue from your program, I suggest you could try to use the process monitor tools to check which process run when you debug your program.

    https://technet.microsoft.com/en-us/library/bb896645.aspx

    Please try the above suggestions to check your issue and then tell mw e latest message about your issue.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 8, 2015 2:39 AM
  • You asked what version of VS I have.  I have Visual Studio Express For Windows Desktop 2013.  I will look at your references now. 

    Thanks.

    Thursday, June 11, 2015 11:16 AM
  • Looking quickly at your links, I don't think they they would help, because I have a hunch that my problem is that I do so many string operations.  My program is a parser for html pages, but it also makes the html page "safe".  To explain why its so much of a computer hog I'll briefly explain what it does:

    The user can specify that he wants to remove just

    1. dangerous tags and attributes

    2. all tags except certain ones (like br and p)

    The code can also make the html safe in other ways - for instance, if the downloaded html is intended to fit in a div in the user's page, he can set a maxwidth, and the code will make sure no images is wider than that.

    To do all this, I have to find every tag, examine it for safety, put it on a stack to see if it is matched by an end tag (I give errors for unbalanced html), replace URLs sometimes, replace CSS height/width sometimes, fix sloppy html etc.  So I have a program that:

    1. does many stack operations

    2. does many string operations.

    It works nicely, but is very slow.  Too slow to be practical in some cases.

    So how do I profile a program like that?  How do I find which routines are taking the most time, without putting "timer code" in every routine etc.

    Thanks.


    Thursday, June 11, 2015 11:24 AM
  • Hi malikmeister,

    Thanks for your reply.

    As you said the program is very slow issue, I suggest you could try to  run code analysis on your Visual Studio solution by going the Buildmenu->choose Run Code Analysis on Solution to check this issue. https://msdn.microsoft.com/en-us/library/3z0aeatx.aspx 

    However, I know the VS2013 Community is a full featured free version of Visual Studio (cannot be used by large corporations) than the express version.

    So I suggest you could try to use this open your program in the VS2013 Community and then use this VS profiler tool to check this program performance issue.

    Reference:

    https://msdn.microsoft.com/en-us/library/bb385749.aspx http://blogs.msdn.com/b/dotnet/archive/2013/04/04/net-memory-allocation-profiling-with-visual-studio-2012.aspx

    Hope it help you!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Tina-Shi Friday, June 12, 2015 10:14 AM
    • Marked as answer by malikmeister Saturday, June 13, 2015 10:02 AM
    Friday, June 12, 2015 10:13 AM