You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue gets exacerbated because we are not just including fhir_stu3_models. We use fhir_client which also needs fhir_dstu2_models and fhir_models (which brings the total up to 77 MiB).
Further details can be examined by running bundle exec derailed bundle:objects. Largely seems to be an issue with string allocations due to how the models are defined.
I'm not sure what the right solution to this problem is, but I think it's worth noting so that others can be aware of the memory footprint required by these gems.
The text was updated successfully, but these errors were encountered:
Taking a look at memory usage using, I was able to see that
fhir_stu3_models
comes in at 31 MiB (for comparison Rails is at 28 MiB).Specifically I was using https://github.com/schneems/derailed_benchmarks and running
bundle exec derailed bundle:mem
bundle exec derailed bundle:mem TOP: 175.75 MiB fhir_client: 77.7852 MiB fhir_stu3_models: 31.3828 MiB lib/fhir_stu3_models/fhir/resources/ImagingStudy.rb: 5.3008 MiB lib/fhir_stu3_models/fhir/resources/DocumentManifest.rb: 1.9961 MiB lib/fhir_stu3_models/fhir/resources/DocumentReference.rb: 1.9023 MiB lib/fhir_stu3_models/fhir/resources/AuditEvent.rb: 1.6875 MiB lib/fhir_stu3_models/fhir/resources/Procedure.rb: 1.375 MiB lib/fhir_stu3_models/fhir/resources/CarePlan.rb: 1.0586 MiB lib/fhir_stu3_models/fhir/resources/Observation.rb: 0.9844 MiB lib/fhir_stu3_models/fhir/resources/FamilyMemberHistory.rb: 0.9219 MiB lib/fhir_stu3_models/fhir/resources/Condition.rb: 0.8867 MiB lib/fhir_stu3_models/fhir/resources/PlanDefinition.rb: 0.7305 MiB lib/fhir_stu3_models/fhir/resources/Media.rb: 0.7031 MiB lib/fhir_stu3_models/fhir/resources/Patient.rb: 0.625 MiB lib/fhir_stu3_models/fhir/resources/ProcedureRequest.rb: 0.5781 MiB lib/fhir_stu3_models/fhir/resources/MedicationStatement.rb: 0.5391 MiB lib/fhir_stu3_models/fhir/resources/AllergyIntolerance.rb: 0.5273 MiB lib/fhir_stu3_models/fhir/resources/ExplanationOfBenefit.rb: 0.5156 MiB lib/fhir_stu3_models/fhir/resources/TestScript.rb: 0.5039 MiB lib/fhir_stu3_models/fhir/resources/MedicationRequest.rb: 0.4688 MiB lib/fhir_stu3_models/fhir/resources/Questionnaire.rb: 0.4648 MiB lib/fhir_stu3_models/fhir/resources/Substance.rb: 0.4336 MiB lib/fhir_stu3_models/fhir/resources/Specimen.rb: 0.3398 MiB lib/fhir_stu3_models/fhir/resources/CapabilityStatement.rb: 0.3242 MiB lib/fhir_stu3_models/fhir/resources/DeviceUseStatement.rb: 0.3242 MiB lib/fhir_stu3_models/fhir/resources/CareTeam.rb: 0.3086 MiB
This issue gets exacerbated because we are not just including
fhir_stu3_models
. We usefhir_client
which also needsfhir_dstu2_models
andfhir_models
(which brings the total up to 77 MiB).Further details can be examined by running
bundle exec derailed bundle:objects
. Largely seems to be an issue with string allocations due to how the models are defined.I'm not sure what the right solution to this problem is, but I think it's worth noting so that others can be aware of the memory footprint required by these gems.
The text was updated successfully, but these errors were encountered: