Skip to content

Conversation

@aledsage
Copy link
Contributor

@aledsage aledsage commented Mar 14, 2017

// See ObjectWithDefaultStringImplConverter (and its usage) for why we want to auto-detect
// annotations (usages of this is in the camp project, so we can't just list it statically
// here unfortunately).
xstream.autodetectAnnotations(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the performance implications of this?!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From http://x-stream.github.io/annotations-tutorial.html#AutoDetect

In auto-detection mode XStream will have to examine any unknown class type for annotations. This will slow down the marshalling process until all processed types have been examined once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be about 5-10% overhead (when testing with a simple EntityMemento that has lots of string keys and brooklyn.parameters). That's certainly acceptable, to fix the issue!

@aledsage aledsage changed the title Adds yaml-dsl rebind tests (for historic state) [WIP] BROOKLYN-451: Adds yaml-dsl rebind tests (for historic state) [WIP] Mar 14, 2017

@Override
public boolean canConvert(@SuppressWarnings("rawtypes") Class type) {
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding a comment here as to why this is hardcoded

@neykov
Copy link
Member

neykov commented Mar 14, 2017

LGTM

Copy link
Member

@m4rkmckenna m4rkmckenna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Tested successful rebind with existing state from 0.10.0 that was previously broken

@aledsage
Copy link
Contributor Author

Thanks @neykov @m4rkmckenna. I've added the comment you suggested. Merging now.

@aledsage aledsage changed the title BROOKLYN-451: Adds yaml-dsl rebind tests (for historic state) [WIP] BROOKLYN-451: Adds yaml-dsl rebind tests (for historic state) Mar 14, 2017
@asfgit asfgit merged commit a536cdc into apache:master Mar 14, 2017
asfgit pushed a commit that referenced this pull request Mar 14, 2017
@aledsage aledsage deleted the test-dsl-rebind branch March 20, 2017 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants