users@jersey.java.net

Re: [Jersey] Client: Performance: InputStream fastest possibility?

From: Johannes Schneider <mailings_at_cedarsoft.com>
Date: Thu, 23 Sep 2010 10:47:05 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/18/2010 07:44 PM, 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?

I tried to use a String instead of an InputStream. But in my tests there
haven't been any difference...
But I think a multithreaded solution might perform better...

>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

- --
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMmxQJAAoJEAytD9R7Qv6d3jcIAOu+FoHwiAwGIyloJGSil0DS
HaixxX+ir8tby3X0paYm30JJV7tMdqEIJyJUtkH2eW83+nzzxII0pzbf946Lpb6y
G7fpbEMuJxltyxp5vVsOEApx+CHVuE/HDjgMH2SH2E8TG/5OyLbyYOGUoFgVcwCg
N0qQW0I5IqeeqqGAFIM8e5AIP+jiD5G1+AcY7BcqTw6xGk1XAPtewdafwR08KEra
/6AKw0AQqcGfnYsped3KBAzo9dS92n8oOaQrpLqQ6Or3zHBE1uwEuyXnILJ5rEZd
LsBfP6SE5ecSZaPrhcMHzcrS78r3ayYv+QzHIHjJ5uzTk3eAJLY1wKZe/7RIZDw=
=2zbD
-----END PGP SIGNATURE-----