tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: latest cvs is broken
Date Tue, 05 Sep 2000 19:04:37 GMT
> It is extremely annoying that CVS is broken. That shouldn't be the case.
> Please don't check in broken code! That is against the rules.
> If you die tomorrow, then it is up to us to come in and clean up your mess.
> Not cool.

Hi Jon,

I think it's my mess - most likely this is the result of refactoring the
output system and using OutputBuffer.

I did as much testing as possible and I tried to preserve all the
existing functionality, but as Nacho said "Errare humanum est".
( please don't hit me with the  second part of the quote - the one
with perseverare :-)

I don't think it is possible to "evolve" and improve the code without
changes, and some changes are more difficult then others. I spend
at least 2 months on this issue, and OutputBuffer is the result
of 2-3 different attempts to come up with the cleanest and
safest solutuion.

The problems that it tries to solve are simple:
- servlet api have very special ( to say so ) rules for output.
Buffering, mixing chars and bytes in ServletOutputStream,
charset selection, flushing/reseting the buffer.
That resultes in a complex code in tomcat 3.0..3.2 - code that
worked fine, but was hard to improve and understand.
By refactoring the code in one class with simpler requirements
( the OutputBuffer) and letting the facade deal with
the various use-cases imposed by the spec we'll be able
to survive.

- performance is also important. It's impossible to
improve the performance of a complex code - a simplification
that re-focuses on the core functionality - buffered output of chars
and bytes - was required. The result are visible, I think, and prove
that we are moving in a good direction.

This change is also very important for the effort to improve our
support for non-ascii charsets ( togheter with the MessageBytes
changes). There is a lot of work and improvement going on into
tomcat 3.3 - and OutputBuffer is an important piece.

I think ( hope ) the problem is not hard to solve, and to be honest
I'm glad it happened - this allows us to test if the new system is simple
enough to be debugged and fixed.

I'll try to reproduce this ( probably this weekend - I'm sorry, but
I also have a day job and a lot of work to do ). I hope I'll not be dead
by then.

Of course, it is still possible to go back to the previous
output code - but I would like to try to fix the new one first.


View raw message