On Sep 18, 2010, at 10:44 AM, Tatu Saloranta wrote:
> On Sat, Sep 18, 2010 at 10:18 AM, Johannes Schneider
> <mailings_at_cedarsoft.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi guys,
>>
>> at the moment I try to optimize some code that fetches a large JSON
>> document. I am using the Client provided by Jersey.
>>
>> At the moment I am calling
>>> resource.getEntity( InputStream.class )
>>
>> My profiler shows me, that the Jackson parser has to wait for the
>> stream
>> (in HttpInputStream#read) for a long time...
>
> Sounds like maybe it is being buffered (read completely into in-memory
> buffer) before being handed to Jackson?
>
Jersey will not buffer the response entity unless you have Jersey
logging enabled (using a filter).
Are you using the Jersey client with HttpURLConnection or the Apache
HTTP client?
Paul.