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

Issue / Domain Layer / Performance Comparison #88

Conversation

dncsvr
Copy link
Member

@dncsvr dncsvr commented Dec 22, 2023

Create a benchmark project and test getting typeinfo from assembly vs
getting typeinfo from a prebuilt static field. Main purpose is to decide if
it is worth to create a DomainModel.cs instead of using reflection.

Tasks

  • Setup a project for performing benchmark tests
    • add model records
  • Setup a baseline benchmark using reflection
    • Add T4 template for generating entites, query and operation object classes
    • Add benchmark method which uses reflection
  • Setup a benchmark using domain model approach
    • Add source generator poject for generating domain model
    • Add benchmark method which uses domain model
  • Refine benchmark tests
    • check for same conventions, make sure generated api models are equal
    • Add a unit test project for validating created ControllerModel
    • Add IDomainModel implementation which is built from reflection
    • Reorganize solution
    • Add a research documentation and fine tune benchmarks tests

    reflection is currently faster than domain model approach, try to speed up domain model

- setup project for designing performance tests
- add `EntityTemplate.tt` for generating entity classes
- add `BenchmarkSpec` for testing do
- add `Build` test class to contain methods for benchmark
@dncsvr dncsvr self-assigned this Dec 22, 2023
@dncsvr dncsvr changed the base branch from main to epic/domain-layer December 22, 2023 11:05
- add `OperationObject` template
- improve `ApiModel build
- Add helper methods for using model dtos
- Add a seperate class library for domain objects
- Add source generator project for building domain model
- Restructure project
@cihandeniz cihandeniz mentioned this pull request Dec 27, 2023
9 tasks
- exclude generated entity and operation object files
- minor edits
- move api model dtos to models project
- add a test operation object
- minor edits
- convert domain dtos to classes
- change Type Type to string Type
- change Lists to Arrays for generated
for generated domain model
- change dtos to structs
- give arrays fixed size
- reduce generated domain model overhead with nullable arrays
- reduce generated domain model overhead with excluding implicitly declared methods
@dncsvr dncsvr marked this pull request as ready for review December 29, 2023 14:27
@dncsvr dncsvr requested a review from cihandeniz December 29, 2023 14:29
@dncsvr dncsvr merged commit 1cd7791 into mouseless:epic/domain-layer Dec 29, 2023
4 checks passed
@dncsvr dncsvr deleted the issue/domain-layer/performance-comparison branch December 29, 2023 15:08
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.

2 participants