|
|
|
|
Playing with the BinaryFormatter
|
As said earlier, I've been thinking about taking the SSCLI's BinaryFormatter and playing with some performance enhancement techniques.
I frankly don't yet know if I will ever be able to share the code with a license which allows for use in production applications, but we'll see. In the meantime, I'll keep you updated about my progress.
The first issue which I'm currently working on is the tight coupling between the BinaryFormatter and some core functionality in the framework. There is a massive number of helper functions which are shared between the different formatters and channels, and which unfortunately are contained in internal classes. I therefore ended up with pulling way more code from the SSCLI than I expected initially.
So my current goal is to extract the BinaryFormatter (plus BinaryClientFormatterSink, BinaryServerFormatterSink, and friends) from the SSCLI so that I can build and use it in a standalone VS.NET project. This will later allow me to a) use some conventional profilers and b) play with the optimization techniques I imagined.
Current stats (updated online ... or such):
- 3:35 PM: ~300 build errors
- 4:15 PM: 75 build errors
- 4:30 PM: 91 build errors. It's getting worse.
- 4:45 PM: 96 build errors. Errorcount increases, so does insight. (And I only had to resort to one dirty BindingFlags.NonPublic hack so far. What a shame that LogicalCallContext's .ctor is internal).
- 5:00 PM: 62 build errors. The future is looking bright.
- 5:15 PM: 4 build errors. Too bad that all of them are CS0122's: "inaccessible due to its protection level". Looks like some more BindingFlags.NonPublic hacks.
- 5:30 PM: 2 build errors
- 5:40 PM: 0 build errors. Now it's time to see how much I wrecked the code.
- 6:05 PM: MethodCallMessage from client to server works. Something is still screwed up when handling the response message on the client.
- 6:07 PM: Return message works as well. Remember: it's not a great idea to call somearray.Length if somearray == null.
|
© 2002 - 2006 by thinktecture, Ingo Rammer and Christian Weyer. All rights reserved.

|
|