At present each XML Validation request seems to involve building an LXM Validator from scratch.
https://github.com/renalreg/ukrdc-cupid/blob/main/src/ukrdc_cupid/core/parse/xml_validate.py#L159
This will be quite a costly operation.
The AI Overlord suggests either pre-loading them as part of the FastAPI Startup process, or just using the standard LRU cache with a "get_validator("1.2.3")" type function.
At present each XML Validation request seems to involve building an LXM Validator from scratch.
https://github.com/renalreg/ukrdc-cupid/blob/main/src/ukrdc_cupid/core/parse/xml_validate.py#L159
This will be quite a costly operation.
The AI Overlord suggests either pre-loading them as part of the FastAPI Startup process, or just using the standard LRU cache with a "get_validator("1.2.3")" type function.