If the string manipulation/comparison/etc is a problem with using too
many CPU cycles, could we just just an int or long and give each
filter an id?  This might also aid in the ordering.
The developer should always know the name or id of a filter, so it
should not make things any more complex.


On 4/25/07, Trustin Lee <[EMAIL PROTECTED]> wrote:
Hi,

Current IoFilter implementations use session attributes to store their
internal data such as an event queue and buffers.  Because the keys of
the internal data attributes are constant, it is impossible to add the
same IoFilter into one filter chain.

We could change the current filter implementations to use session
attributes with some common dynamic prefix.  I think
"filter.<filterName>." will suffice.  With this standardized scheme,
users  will be able to add multiple filters (e.g. more than one
ProtocolCodecFilter) easily.

One problem is it involved String manipulation and therefore costs CPU
resource though.

WDYT?

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6



--
..Cheers
Mark

Reply via email to