Performance issue when updating to XSteam 1.4.9

54 views
Skip to first unread message

Ralf Purnhagen

unread,
Jul 26, 2016, 4:30:14 PM7/26/16
to XStream User
After upgrading from XStream 1.4.8 to 1.4.9 i observed a huge degradation of the performance for XML (un-)marshalling. XStream suddenly got 50-100% slower.

I created a sampling with VisualVM. In my opinion the reason for the perfomance degradation is the new code for the fix "Implicit collection declaration is erroneously inherited or propagated to hidden field of same name." in the class ImplicitCollectionMapper. This fix leads to massive calls to Class.getDeclaredField, which is extremly expensive.

Would it be a possible, to cache the results of the getDeclaredField call or do you have any other idea for a performance optimization?

Regards,
Ralf

Jörg Schaible

unread,
Jul 27, 2016, 9:11:41 AM7/27/16
to xstrea...@googlegroups.com
Hi Ralf,
Well, in general XStream 1.4.9 should have been faster ;-)

Can you open an issue about this at GitHub? Then I can investigate.

Cheers,
Jörg

Ralf Purnhagen

unread,
Jul 27, 2016, 9:23:35 AM7/27/16
to XStream User, joerg.s...@bpm-inspire.com
Hi Jörn,

in general it is 10 to 15% faster. In my case not.

I just opened a pull request suggesting a cache for field names. Please have a look at it.

Regards,
Ralf

Ralf Purnhagen

unread,
Aug 3, 2016, 1:38:34 PM8/3/16
to XStream User, joerg.s...@bpm-inspire.com

Jörg Schaible

unread,
Aug 4, 2016, 3:43:58 AM8/4/16
to xstrea...@googlegroups.com
Hi Ralf,

Ralf Purnhagen wrote:

I've seen the PR and basically it's OK, but I'll try to use an internal
already availabel cache for it. Nevertheless I face currently some hardware
problems, therefore my coding activities stalled a bit.

Cheers.
Jörg

Reply all
Reply to author
Forward
0 new messages