Repository navigation
[dictionary] Query visits and cohorts once per scan type and category - #11364
Open
HenriRabalais wants to merge 1 commit into
Open
HenriRabalais wants to merge 1 commit into
HenriRabalais wants to merge 1 commit into
Conversation
HenriRabalais
added a commit
to HenriRabalais/Loris
that referenced
this pull request
Dec 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
/dictionary/module/<name>, which dataquery calls when a category is picked, runs two queries for every field in the module.DataDictRowProvisionerqueries the category's cohorts inside the loop over its items, although the cohorts depend only on the category. The imaging query engine'sgetVisitList()queries a scan type's visits once per field, although every field of a scan type has the same visits. On an instance with many scan types that adds up to thousands of identical queries, and the imaging dictionary takes about half a minute to load.This moves the cohort query up to once per category, and caches visits per scan type in the imaging query engine, the same way the instruments query engine caches them per instrument. The imaging dictionary now loads in a couple of seconds, and so does the full dictionary that cross-category search needs.
Changes
DataDictRowProvisionerruns the cohort query once per category instead of once per item.QueryEngine::getVisitList()caches the visit list for each scan type.Testing Instructions
GET /dictionary/module/imaging_browser, or pick the imaging category in the dataquery.Related Issues
Resolves #11224