cqframework / cqframework/cql-execution
Performance Issues with executor
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 84
- Forks
- 38
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 1
Description
We are in the process of implementing NCQA HEDIS dQMs behind a web service. NCQA references this project as the cql + elm execution engine they had used. They directly release the cql and elm to for us to run against our patients' FHIR r4 resource bundles. Our goal is to be able to synchronously process measures in a request/response lifecycle. What we're seeing in AWS Lambda runtime is that executor.exec(patientSource) is taking approximately 15 seconds per patient measure. To our organization that seems unacceptably slow regardless of any overhead involved in interpreting the ELM, especially considering that we're feeding the executor all the resources it needs in RAM and the Patient source represents one patient with approximately 1MB in resource data.
I recognize that you are not responsible for the code that get fed into your engine, but in this instance, to ensure compliance with NCQA, neither are we. What I'm seeking are diagnostic tools, ie. a stopwatch at the expression level that might emit traces to help us pinpoint what exactly is causing performance issues and take those issues back to NCQA.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/runtime/executor.ts around lines 91-93 and reproduce the reported executor.exec(patientSource) path using the issue's AWS Lambda and roughly 1 MB patient-resource context. Trace the existing execution flow to determine where expression-level timing could be emitted; done means the diagnostics identify which expressions contribute to the approximately 15-second measure execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100