users@jersey.java.net

RE: [Jersey] Custom inject provider

From: Guba, Nicolai <nguba_at_bioware.com>
Date: Mon, 29 Jun 2009 12:23:36 -0700

You don't have to use JAXB at all. You can just obtain the request as String and then unroll your own object.

We have actually measured the impact of this and the results have shown about a 16% overhead of Jackson unmarshalling vs the good ol JSONObject (go figure! I thought Jackson was meant to be quicker).

If raw protocol speed is of essence, then looking at fast infoset may be a better alternative. As far as we are concerned, we have benchmarked our request handling in the region of 16-17k requests per second per server---which is most adequate.

Happy Hacking!

-- 
   =NPG=
-----Original Message-----
From: Tatu Saloranta [mailto:tsaloranta_at_gmail.com] 
Sent: Friday, June 26, 2009 1:55 PM
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] Custom inject provider
On Fri, Jun 26, 2009 at 2:32 AM, Paul Sandoz<Paul.Sandoz_at_sun.com> wrote:
> On Jun 26, 2009, at 9:53 AM, testn wrote:
>
>>
>> Just theoretically :-) if I find Jersey is too slow and I would like to
>> replace InjectableProvider, RequestDispatcher, etc with bytecode
>> implementation instead of reflection. Is there a way I can do it easily?
>
> First i would recommend if you find it too slow to understand why it is slow
> by measuring and getting some performance data as the initial assumptions as
> to why it might be slow could be wrong. Data is king!
+1. Specifically since I too was suspicious of performance of
reflection-based access; but found out that overhead for even
low-level things like data binding is rather modest overall. This
comparing reflection-based fully automated data binding (of Jackson,
json<->beans) to hand-written binder that would be best a
bytecode-based one could achieve.
-+ Tatu +-
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net