Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making contextType optional in UnmarshalingWithContext and UnmarshalUpdatingWithContext protocols #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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