XStream

Misc performance improvements (for detected HotSpots via profiler)

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.3
  • Fix Version/s: 1.3.1
  • Component/s: None
  • Labels:
    None

Description

Based on trying to resolve performance problems (for my use case, XStream badly lags JAXB 2.0), I found and resolved 3 hot spots that were easy enough to fix. One was for an existing issues (XSTR-506), but I didn't see entries for other 2.

Anyway, please see attached files for patched versions – I verified that they each resolved a hot spot (i.e. didn't show prominently in profiler output after change), and improved read (deserialize) performance significantly.

  1. FieldAliasingMapper.java
    02/Sep/08 6:15 PM
    4 kB
    Tatu Saloranta
  2. SerializationMethodInvoker.java
    02/Sep/08 6:15 PM
    6 kB
    Tatu Saloranta
  3. XmlFriendlyReplacer.java
    02/Sep/08 6:15 PM
    4 kB
    Tatu Saloranta

Issue Links

Activity

Hide
Joerg Schaible added a comment -

Hi Tatu,

thanks again for your patches. The patch for the SerializationMethodInvoker has been applied, the patch for the FieldAliasingMapper has been solved differently as such a Field class already existed in XStream's code base and the patch for the XmlFriendlyReplace has been applied and improved by adding a cache.

You may give the head revision a try ...

Regards,
Jörg

Show
Joerg Schaible added a comment - Hi Tatu, thanks again for your patches. The patch for the SerializationMethodInvoker has been applied, the patch for the FieldAliasingMapper has been solved differently as such a Field class already existed in XStream's code base and the patch for the XmlFriendlyReplace has been applied and improved by adding a cache. You may give the head revision a try ... Regards, Jörg
Hide
Joerg Schaible added a comment -

Set correct fix version.

Show
Joerg Schaible added a comment - Set correct fix version.
Hide
Joerg Schaible added a comment -

Fixed for upcoming release.

Show
Joerg Schaible added a comment - Fixed for upcoming release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: