Skip to content

Conversation

@djrobstep
Copy link

Currently this module has quite a large import time (over 0.5 sec on my machine).

This PR reduces this by lazy-loading the syntax validators lazily on attribute access.

@jkowalleck
Copy link
Contributor

the syntax_parser = Lark(grammar, start=["iri", "iri_reference", "absolute_iri"], parser=RFC3987_SYNTAX_PARSER_TYPE) is still not lazy

@djrobstep
Copy link
Author

I suppose I can move that too

@djrobstep
Copy link
Author

Moved. It is probably possible to go further and entirely avoid loading lark upfront. But this feels like a big enough change already for one PR.

@gogasca
Copy link

gogasca commented Jan 6, 2026

@paugier paugier mentioned this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants