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

Bug Report: Improve memory usage of components not needing regex #13639

Closed
dbussink opened this issue Jul 27, 2023 · 0 comments · Fixed by #13640
Closed

Bug Report: Improve memory usage of components not needing regex #13639

dbussink opened this issue Jul 27, 2023 · 0 comments · Fixed by #13640
Labels
Component: Evalengine changes to the evaluation engine Type: Bug

Comments

@dbussink
Copy link
Contributor

Overview of the Issue

The addition of the ICU regular expression in #13391 has led to a small but nonetheless significant memory increase in components that don't need the evalengine in the end. This applies to things like vtorc, vttablet etc.

Those components do end up importing the evalengine through long dependency chains and also more directly through utility functions like ToInt64 / ToUint64 (https://github.com/vitessio/vitess/blob/main/go/vt/vtgate/evalengine/api_types.go#L60-L96).

But when the evalengine is loaded, we also end up loading the regular expression ICU data files. If we move to lazy loading these files on actual usage, we save additional memory.

Reproduction Steps

Screenshot 2023-07-27 at 10 02 51

The slices.Insert allocation shown here is coming mostly from the icuregex package.

Binary Version

HEAD

Operating System and Environment details

All

Log Fragments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Evalengine changes to the evaluation engine Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant