Re: [woodstox-user] InternCache - intern() method causing thread synchronization issue

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [woodstox-user] InternCache - intern() method causing thread synchronization issue

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 6, 2009 at 12:30 PM, vadheraju1 <Rajeswar.Rao@...> wrote:
>
> We are using AXIS  and Xfire as our soap stacks which internally use
> woodstox. and In a load test, we see thread are waiting on InternCache
> object - due to the fact that intern() method is Synchronized.
> We changed the code it seems to be fixed the issue; we need someone from
> woodstox team to confirm our change.
>
> Jar : wstx-asl-3.0.1
...

First of all, thank you for your suggestion. It is always possible
that implementation could be improved.
I'll have a look at proposed change (first create a Jira issue for it.

I have some questions regarding the change. First: version 3.0.1 is
rather old, and although I don't think there have been drastic
changes, it would be good if the performance aspects could be verified
with a more recent version. 3.2.9 should be fully backwards
compatible, so if you could re-check findings using that version it'd
be great.

Also: I am somewhat surprised that this method could be heavily
contested; and that suggests that perhaps your application is not
reusing XMLInputFactory instances as expected. The reason for this is
that intern()ing only occurs if symbol is not found from symbol table;
and symbol table gets populated and recycled on per-input-factory
basis. Which means that fairly quickly such cache misses should be
very rare.
Put another way: this could indicate sub-optimal behavior within
service itself, whereas symbol tables are not being reused. So you may
want to see how reuse is implemented -- it has significant performance
benefits, especially for small to medium size documents.

-+ Tatu +-

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email