OpenRA/OpenRA — pull request #5616 by RoosterDragon (2014-06-12 04:26:22+00:00)
Title: Rewrite SyncReport for clarity and performance

SyncReport was being a fairly big drain on my tick times so I decided to bite the bullet and rewrite the thing.

- The dynamic code generation is replaced for clarity.
- The costly reflection performed when dumping traits is now cached which is a big speedup.
- Allocations are reduced significantly by only saving arrays of values when dumping traits.
- I threw in an exception for properties with the sync attribute applied that either were not readable or used index parameters since they can't be dumped.

I tested this by dumping reports from the RA shellmap and this produces identical output (that shellmap is so handy for testing being deterministic and whatnot - best dev feature ever).