Skip to content

Conversation

@gautier-gdx
Copy link

For some databases like Realm managed Object are not systematically persisted and doesn't need a context to be initialised: a Realm object in this case.
Having to create a Realm (or other type of coordinator) each time we want to generate those type of object even if we don't need it can lead to real performance issues.

That why I propose in my pull request to make the context an optional in both UnmarshalingWithContext and UnmarshalUpdatingWithContext protocols.

@jarsen
Copy link
Member

jarsen commented Nov 28, 2016

That is a good point, this is a breaking API change though so we'll have to give it some thought.

Do we change this API? Provide new API? Not sure.

@KingOfBrian
Copy link
Contributor

Is any change really required? It's an associated type, so optional context is just another type. I just tried it out in my app and it appears to be fine.

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.

3 participants