Pilchie / xunit.runner.wpf

XUnit Gui written in WPF
Apache License 2.0
44 stars 41 forks source link

Loading tests is... so... slow... #24

Closed DustinCampbell closed 8 years ago

jaredpar commented 8 years ago

Yeah I think this is because we send the full serialization string over the wire. It's not needed. We could just send the name.

DustinCampbell commented 8 years ago

It could also be related to the collection refiltering and the UI painting.

DustinCampbell commented 8 years ago

@CyrusNajmabadi and I looked at this. It's a confluence of several things:

  1. Yes, we're serializing more than we need to. We can do less.
  2. xUnit's TestMessageVisitor isn't all that efficient at dispatching messages due to tons of 'as' casts at the JIT level (see https://github.com/xunit/xunit/blob/fe8d78df7cfec55ddab93c29ea96b0032ca998a8/src/common/TestMessageVisitor.cs#L53). We can do better by implementing IMessageSink ourselves.
  3. We're using AppDomains to do test discovery, which is overkill when we've got the worker process. We should just recycle the process.
  4. We can do a better job of adding test cases to the UI in batches.
DustinCampbell commented 8 years ago

We can probably do more here, but PRs #37, #38 and #40 make this experience much better.