-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Bug Report: Improve memory usage of components not needing regex #13639
Copy link
Copy link
Closed
Labels
Description
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
The slices.Insert allocation shown here is coming mostly from the icuregex package.
Binary Version
HEADOperating System and Environment details
AllLog Fragments
No response
Reactions are currently unavailable