.net - What can cause slow run at debug mode? -


i had issues debugging complex integration test in our application. test involves setting environment, deploying database , tested code uses lot of database queries nhibernate, spring.net (di, aop, transactions, ...), multithreading , network activity when communicating integration platform (includes calls native dlls).

i have 2 systems work same code base:

notebook

  • i7 (2 cores ht = 4 logical cpus), 4gb ram, 5400 rpm disk, win 7 64bit

virtual machine (oracle virtual box)

  • host: i7 (4 cores ht = 8 logical cpus, 12 gb ram, system runs ssd, virtual machine 7200 rpm disk, win 7 64bit)
  • virtual machine: 4 cores assigned, 8 gb ram assigned, win 2008 r2 enterprise (64 bit)
  • vpn network communication
  • no other virtual machine runs on host

now if run test without debugging execution time same 12-15s (so network communication should not issue) if run test debugging takes less 2 minutes on notebook more 4 minutes on virtual machine (i need debug code @ end of test). expect virtual machine perform better notebook more 2 times slower!

the test code uses nunit, spring.net test base classes , runs vs 2010 ultimate + resharper test session.

it proof of concept code unit test coverage quite low. wrote additional unit tests test code possible separately still parts not written in way easy cover unit tests.

side note: point of proof-of-concept among others identify these parts further refactoring, not refactor code now.

what can cause speed difference?

edit:

when writing question thought other reason not related programming - put separate question on superuser.

i've such issue in past, problem related wrong usage of third-party library causes race conditions , timeouts. enabling of kind of exceptions helped me find out test hangs. try enable exceptions in visual studio -> debug -> exceptions , run test again


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -