Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add lazy loading to regular expressions #16

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

nieomylnieja
Copy link
Collaborator

Motivation

We should aim at limiting initial load time when importing the library, one of the contributors to the initial load time are compilations of regular expressions. We should avoid loading all of them at once, but rather lazy load the ones which are used by users once.

Related Changes

go-playground/validator#1277

Release Notes

All regular expressions are now lazy loaded, once when the corresponding rule is used.

@n9-machine-user n9-machine-user added enhancement New feature or request go Pull requests that update Go code minor New functionality with at most minor brekaing changes labels Sep 4, 2024
@nieomylnieja nieomylnieja merged commit 73dd5a3 into main Sep 19, 2024
5 checks passed
@nieomylnieja nieomylnieja deleted the lazy-load-regular-expressions branch September 19, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code minor New functionality with at most minor brekaing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants