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

Lazy Initialization #43

Closed
5 tasks done
phatboyg opened this issue Dec 25, 2017 · 1 comment
Closed
5 tasks done

Lazy Initialization #43

phatboyg opened this issue Dec 25, 2017 · 1 comment

Comments

@phatboyg
Copy link
Owner

phatboyg commented Dec 25, 2017

Let's face it, startup time to compile the entire schema is long (relatively).

And it's rare that the entire schema is used immediately. So validate it, and then wait until entity converters are used to initialize the property converters, etc. That way, all the expression compilation is happening in the background using the TPL, instead of occurring inline.

  • Cache all type/property setters and getters
  • Defer expression compilation to background Task
  • Use basic reflection until fast expression-based accessor is compiled
  • Use cached accessors for translators
  • Use cached accessors for creators

This should significantly reduce the startup time of using the schema.

@phatboyg
Copy link
Owner Author

phatboyg commented Jan 7, 2018

All this work is in c51cf43

@phatboyg phatboyg closed this as completed Jan 7, 2018
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

1 participant