Fix performance issue about XStream serialization