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

Possible to pre-compile EDM model? #1329

Open
Steve887 opened this issue Oct 25, 2024 · 1 comment
Open

Possible to pre-compile EDM model? #1329

Steve887 opened this issue Oct 25, 2024 · 1 comment
Assignees

Comments

@Steve887
Copy link

I'm trying to save some time on the first request of our app. Because our OData model is quite big, building the model takes several seconds on the first request.

Is it possible to pre-compile the model at design time and use this at runtime, much like how you can precompile an entity framework model?

@julealgon
Copy link
Contributor

Something tangentially related was discussed here:

Apparently the OP wanted something similar to what you need, which is basically to cache the EDM and load it quickly on startup. In his case, he saved it to XML and deserialized during startup, but there are some limitations with that approach as described in the issue.

Might still be useful for you to take a look.

Having a "first-class" way to pre-generate the EDM would be very beneficial though. Perhaps a source-generated EDM would be ideal.

The slowness of the EDM model build-up at startup has also been reported here before:

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

3 participants