Locations of visitors to this page
    Sprouting Synapses       Minimize  

             
            Minimize  
Author: SkySigal Created: 8/27/2008 1:29 AM
Investigations into practices that could be optimized to take less time...

By SkySigal on 10/31/2008 1:27 PM

just had to do a re-install, and needed to nudge ANTS Profiler into VS 2008.

Here's a copy -- for safe-keeping/quick finding -- of the official instructions from their website on how to get the two to work together:

ANTS Profiler version 3.2 and up provide full support for Visual Studio 2008. If you have a previous version of ANTS Profiler, you may either upgrade your software or follow these instructions to use your currently-installed ANTS Profiler version 3.0 or 3.1 with Microsoft Visual Studio 2008.
You cannot automatically profile a namespace, method, or class from within Visual Studio 2008 without applying a slight change to the ANTS Profiler add-in. To allow Visual Studio 2008 to load the ANTS Profiler add-in, it's necessary to add a bit on information into the ANTSProfiler.Addin file located in %programfiles%\red gate\ants profiler 3 by editing it using a text editor such as notepad.exe:

After the text:
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>8.0</Version>
</HostApplication>
----------------------------------------------
Add:
----------------------------------------------
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>9.0</Version>
</HostApplication>
and save the file.

It may also be necessary to add the path to the ANTS Profiler add-in so that Visual Studio can locate it. From Visual Studio 2008's Tools menu, select Options, then Add-in/Macro security. If the path to the ANTS Profiler 3 installation folder (c:\program files\red gate\ants profiler 3) is not listed in the collection of add-in file paths, click the add button and select the installation folder.
After restarting Visual Studio 2008, the add-in will function as it does in previous versions of Visual Studio. When the next version of ANTS Profiler is released, the extra configuration steps for the add-in will be unnecessary.
Visual Studio 2008 has also changed the file location of the .NET Framework's Development Web Server, meaning that the option to profile an ASP .NET web application using ANTS Profiler will be unavailable. Until this can be rectified, it is possible to profile the development web server as an ASP .NET desktop application by following these steps:
- Start ANTS Profiler
- Select either Profile memory or Profile performance
- Select .NET desktop application as the type of project
- Click the elipsis (...) to the right of .NET desktop application and browse to %commonprogramfiles%\Microsoft Shared\DevServer\9.0
and select Webdev.WebServer.exe
- Let the working directory automatically update
- Fill in the arguments necessary to start your web application:
/Path:"c:\inetpub\MyApp" -the path to the web application on your hard drive
/port:8080 -a TCP port not currently used by IIS (or other app)
/vpath:"/MyApp" -the name of the virtual directory where the app normally is found in when you run it in IIS
- Choose what code to profile and click Finish
- Start a web browser and enter the address of the web app on your local machine, in this case http://localhost:8080/MyApp
- Use ANTS Profiler as normal (take snapshot, etc)
- When you are finished, close the web browser and then the console window launched by webdev.webserver.
Please note that we do not guarantee any compatibility between Visual Studio 2008 and ANTS Profiler versions lower than 3.

Links:
http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Profiler&c=knowledgebase%5CANTS_Profiler%5CKB200708000130.htm

powered by metaPost

By SkySigal on 6/20/2008 4:37 PM

I've always wondered about the cost of creating fresh IDbConnections: because it doesn't look exactly cheap, even with connection pooling:

If you think about it for a second, You have a ConnectionSettings object that contains a ConnectionString which is eg 40 chars long, which is the key in a hash table of cached/pooled IDbConnection> objects, and there has to be some kind of cost looking for an open connection, right?

Not by much...other things equal, it appears that it costs about 8% more time to build a new connection from scratch every time:

 

 

Read More »

By SkySigal on 6/13/2008 10:55 PM

Try/Catches are very useful.
But don't overdo it. Nothing comes for free: try/catches slow things down.

In the following example, with just an Add statement, its 10 times slower...

Read More »


             
Copyright 2007 by Sky Sigal