How Windows Vista Security helped us make a Faster Application
Part of the coming TypeMock.NET version, we completed our support for Vista Machines.
TypeMock.NET has been compatible with Windows Vista for quite some time now, the only feature that was missing was the Tracer.
Although the Tracer is not required to run tests using TypeMock, it is very handy when your mocks are not working well.

Using the Tracer it is possible to see the expectations the instances of the mocked types and where the code didn’t meet the expectations.
Shared Memory
In .NET 1.1 we used a Shared Memory Paradigm to pass information from the test to the tracer. This worked very well, but in Windows Vista, you have to be an administrator to create a global shared memory. This is not always possible, we need to be able to test an application in normal scenarios and we don’t want to be forced to be an administrator. I am not really sure why there is such a security issue with creating a global shared memory, I will be happy to hear for you.
Since .NET 2.0, there is support for IPC (Inter-Process Communication) Remoting using named pipes, we decided to use this option. We decided to try to use the shared memory implementation first, and if we fail to create the memory we will use the IPC. This way we won’t have the problem of the Tracer running in .NET 1.1 and listening to the shared memory, while the tests are running in .NET 2.0 and are sending trace information over IPC.
After some testing and refactoring, the tracer worked on Vista, but we had a suprise.
We found that using IPC was 3 times faster!!! then our shared memory implementation.
We changed the code. This time the tracer will listen to both the shared memory and the IPC port. TypeMock will then first try to communicate using IPC, if it fails it will try using the shared memory.
1 Comment to “How Windows Vista Security helped us make a Faster Application”
Recent Posts
- Top 5 questions to ask when checking references
- Unacceptable: Unit testing will take 20 years to catch on
- The 4 reasons why we DIDN’T choose Oslo
- Typemock Academy Launch
- The First Rule to Software Craftsmanship
Categories
- .NET Tests
- Agile
- Code Integrity
- Community
- Debugging
- Fun
- Management for Geeks
- Marketing
- Product
- Release
- Reviews
- SharePoint
- TDD
- Time Management
- Uncategorized
- Unit Tests
Archives
- August 2010
- May 2010
- April 2010
- March 2010
- February 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- August 2008
- July 2008
- May 2008
- April 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006

Tech Question:
Q