Solutions or workaound for Visual Studio conditional breakpoint slowness

c#, visual-studio, visual-studio-2012

Solution

Evidently conditional break points being very slow is a known issue. See: http://www.bing.com/search?setmkt=en-US&q=visual+studio+conditional+breakpoint+slow

Since I know how many times my function will be called, deterministic simulation, I ended up using visual studio's `Hit Count` breakpoint feature.

This allowed me to not have to hack up the code with an `if` statement and iterate faster if my break condition changed.

Problem

I'm using a conditional breakpoint to determine when a `C#` `DateTime` variable is greater than a certain time. This breakpoint will be checked approximately 50,000 times in a run. my conditional breakpoint looks like: ``` quote.Time > new DateTime(2014,2,4,3,59,0) ``` Without this conditional break point my test run takes about 15 seconds. With the conditional breakpoint it takes 45 minutes. Is there anything I can do to help speed this without modifying the code I'm debugging to add an assert or conditional? Is there anyway to make it calculate the DateTime variable only once? Or is this more of an architectural issue with how conditional breakpoints are implemented in the IDE?

Original source