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

[persistent-template] schema organization and compilation times #778

Closed
naushadh opened this issue Feb 7, 2018 · 3 comments
Closed

[persistent-template] schema organization and compilation times #778

naushadh opened this issue Feb 7, 2018 · 3 comments

Comments

@naushadh
Copy link
Contributor

naushadh commented Feb 7, 2018

This isn't so much a bug or support request, but something I discovered that could enhance developer experience. See sample project/findings here naushadh/persistent-examples. TLDR: breaking entity definitions into smaller components can yield immense compilation time gains.

Is there any downside to the approach? Should persistManyFileWith be added as an official persistent-template API? Should guides suggest this approach (for compile time gains)?

Possibly related things:

@MaxGabriel
Copy link
Member

I'm OK with all of these approaches. They should probably be caveated as optimizations for advanced users, and not the standard approach. persistManyFileWith sounds good, though I don't know how hard it would be to fix the foreign keys with parseReferences

@naushadh
Copy link
Contributor Author

fix the foreign keys with parseReferences

Not sure I understand. Somehow use stateful TH within parseReferences to accomplish what persistManyFileWith externally does?

@MaxGabriel
Copy link
Member

Oh sorry I misunderstood you, I didn't realize parseReferences was something you were already using.

Ok so I think this should be added as a new API to Persistent for sure

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

No branches or pull requests

2 participants