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

Typeconverter is called for every new context (1.0) #511

Closed
DamienM419 opened this issue Sep 5, 2024 · 3 comments
Closed

Typeconverter is called for every new context (1.0) #511

DamienM419 opened this issue Sep 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Runtime

Comments

@DamienM419
Copy link
Contributor

DamienM419 commented Sep 5, 2024

When using context patient and creating a new context for each bundle datasource, the creation of the context is taking about 27% of the time for 100k patients. The reason for this is because in the FhirModelBindingSetup the FhirTypeConverter.Create occurs every time when it only needs to happen once and be passed into the constructor to be reused.

To Reproduce
Create a unit test with a batch of patient bundles and create new context in a parallel foreach, profile the unit test and you will see 1 line of code eating up most of the run time for the context creation.

Expected behavior
TypeConverter creation only needs to happen one time since it's related to the CQL and not the datasource.

Screenshots
image

Version used:
develop branch

@baseTwo
Copy link
Collaborator

baseTwo commented Sep 5, 2024

@DamienM419 are you currently working on this? Would you mind assigning this ticket to yourself?

@ewoutkramer
Copy link
Member

This is fixed for 1.0 by #512 , so I suggest we keep this open until we have ported/reimplemented this fix for 2.0.

@baseTwo baseTwo self-assigned this Sep 13, 2024
@baseTwo baseTwo changed the title Typeconverter is called for every new context Typeconverter is called for every new context (1.0 and 2.0) Sep 13, 2024
@baseTwo baseTwo changed the title Typeconverter is called for every new context (1.0 and 2.0) Typeconverter is called for every new context (1.0) Sep 25, 2024
@baseTwo baseTwo removed their assignment Sep 25, 2024
@baseTwo baseTwo changed the title Typeconverter is called for every new context (1.0) 511 Typeconverter is called for every new context (1.0) Sep 25, 2024
@baseTwo baseTwo changed the title 511 Typeconverter is called for every new context (1.0) Typeconverter is called for every new context (1.0) Sep 25, 2024
@baseTwo baseTwo closed this as completed Oct 8, 2024
@baseTwo
Copy link
Collaborator

baseTwo commented Oct 8, 2024

Creating a separate issue for 2.0 #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Runtime
Projects
None yet
Development

No branches or pull requests

3 participants