On Fri, 2018-11-23 at 08:36 -0700, Gary Gregory wrote: > On Fri, Nov 23, 2018 at 1:24 AM Oleg Kalnichevski <[email protected]> > wrote: > > > On Thu, 2018-11-22 at 21:02 -0700, Gary Gregory wrote: > > > Hi All: > > > > > > How about removing IncomingHttpEntity and reusing > > > InputStreamEntity > > > like > > > this: > > > > > > https://pastebin.com/3LQ0Rfdv > > > > > > ? > > > > > > Gary > > > > I created IncomingHttpEntity on purpose. This class does not parse > > Content-Type and Contnent-Encoding encoding headers unless they are > > accessed by the application code. Header parsing is an expensive > > operation. > > > > Hi Oleg, > > Computation to get a Header's String value only happens when using > BufferedHeader#getValue(), all other Header implementations of > getValue() > access an instance variable. > > Questions: > - Is the implementaion of BufferedHeader#getValue() you only concern > here?
Yes. > - BufferedHeader does not cache the result of its extraction oddly > enough. > If it is that expensive to do, why not cache it? > Why would anyone in their sane mind access the value multiple times? Generally, it is a performance vs memory footprint trade-off. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
