Kris Maglione wrote: > I like your new 9P code. It has the best aspects of mine, and none of > the worst. It's nice. Some of the things you do are pretty clever.
Thanks Kris (and welcome back)! This is a great honor for me. > message_types.rb, though... You seem to have read that 'high level > message passing in ruby' article/blog entry. Other than that, I like the > idea. I had not read such an article and there was no message_types.rb in my code. However, I believe you are referring to the over-aggressive OOP factorization of Message classes. Initially, I just had a single Message class that performed to/from 9P byte-stream conversion for all types of messages (KISS, YAGNI). After I did some profiling, it showed that this runtime message processing (if format == blah, do blah blah, ...) was a performance bottleneck. So I simply factored the conditional runtime into specialized classes / traits which each only handled their particular case. Gained a 129% speed up from doing this, and it didn't make the code too much more complex. :-)
