Particular/NServiceBus — pull request #1745 by roycornelissen (2013-11-07 13:17:43+00:00)
Title: Performance improvements EncryptionMessageMutator

Performance improvements for `IsSystemType` and reflection for `EncryptionMessageMutator` (issue #1630)

When doing 1,000,000 messages, both changes combined will bring boost the performance of `EncryptionMessageMutator` from ~208 sec. to ~18 sec.

The most significant improvement is the cache in `IsSystemType`.

This PR replaces and includes my previous attempt and addresses the code reviews done by the Particular team.

A note on the review:

I tried indexing `IsSystemType` by `Assembly` but the repeated call to `.Assembly` causes significant overhead. Indexing by type takes up a bit more memory but is faster.