- A Step Toward Realism
- Overview
- New Architecture Code Examples
- The Usual Type of Client-Side Code
- A Couple of Tweaks that Help Performance
- Collapsed Objects
- Statuses in One Single Byte
- Object Vector
- NonSerialized()
- Using "Dumb" Collections
- Another Struggle with Guids
- Oops, Maintainability Must Be Lost!
- And a Few Tweaks Not Applied Yet
- A New Test Application
- Results of the Throughput Tests
- Conclusion
A Couple of Tweaks that Help Performance
As always, when you do something, you have to find a balance among competing requirements. One of the requirements for my new architecture is to get decent performance while also saving the client-side programmer and the business-tier programmer from writing a lot of code. I have done a couple of performance-related tweaks that I want to tell you about. One thing that goes for all the tweaks is that I want to not have to use custom serialization (implementing ISerializable) if I don't have to. Supporting custom serialization with hand-written code is tedious and error-prone. When using code generation, this is less an issue, but we have one task fewer to support in our generator if we don't need custom serialization. So, let's start to see how far we can get when avoiding it.
The first tweak is "collapsed."
NOTE
Before we get going, please note that this article is based on version 1.0 of the .NET Framework. Some of what I discuss here might have changed in 1.1.