This is one of the things I am not 100% sure about. I think CharSequence is probably the way to go, but I need to investigate the performance of the various options.

With the Servlet API end users need to use String anyway, so if we made AsciiString part of the API we may end up with worse Servlet performance but better native handler performance, so there will probably be a trade off somewhere.

Stuart

On Tue, Apr 23, 2019 at 10:42 PM Carter Kozak <ckozak@ckozak.net> wrote:
Greetings,

I'm curious what the plan is for HttpString in undertow 3.x, since this will potentially be the most frequent migration for components which don't implement custom xnio mechanisms. At the moment, the 3.x branch has replaced most uses of HttpString with String, however netty provides a similar AsciiString type which may provide similar performance characteristics to HttpString. Have we considered using the Netty type directly where HttpString is currently used, or using CharSequence instead of string since AsciiString already implements CharSequence, and HttpString may be updated to support it? Based on UNDERTOW-147 [1] I suppose there's some question as to whether or not a non-string type is desirable for Servlet uses.

Thanks,
Carter

1. https://issues.jboss.org/browse/UNDERTOW-147
_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev