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

Entitiy Queries & TypeFactory #783

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

Acruid
Copy link
Contributor

@Acruid Acruid commented Apr 8, 2019

  • Fixed bug where duplicate component instances were being sent in an EntityState. This should help network traffic a bit.
  • Changed how EntityQueries worked resulting in a 3x perf increase for the EntitySystemManager.Update() method. (43% -> 14% Total CPU Time, Debug Build)
  • Removed the useless giant ComponentEntityQuery. It should have never existed. Use the PredicateQuery if you need complex boolean logic (hint: you won't).
  • Added the new IDynamicTypeFactory to IoC for instantiating arbitrary types. This removes the need for Activator.CreateInstance() and IoCManager.InjectDependencies() anywhere in code.
  • Allowed the DependencyCollection to be able to inject itself as a dependency. This is required for a very specific use case (abstract factories), DO NOT PASS AROUND THE CONTAINER AS A DEPENDENCY.
  • Utilized IDynamicTypeFactory in ComponentManager as an example of its use.

…r.Update() method.

Removed the useless giant list EntityQuery.
Allowed the DependencyCollection to be able to inject itself as a dependency. Hopefully it won't be abused too bad.
Added the new IDynamicTypeFactory to IoC for instantiating arbitrary types. This removes the need for Activator.CreateInstance() and IoCManager.InjectDependencies() anywhere in code.
Utilized IDynamicTypeFactory in IComponentManager as an example of its use.
@Acruid Acruid added Issue: Feature This issue is a feature request Issue: Performance Things are slow. System: Entities labels Apr 8, 2019
@Acruid Acruid requested a review from PJB3005 April 8, 2019 09:28
@ghost ghost assigned Acruid Apr 8, 2019
@PJB3005 PJB3005 merged commit d58d576 into space-wizards:master Apr 8, 2019
@ghost ghost removed the W: Review label Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Feature This issue is a feature request Issue: Performance Things are slow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants