Cache the results of Regex.Expand()
Offen
good first issue
performance
- Vorherrschende Sprache
- Go
- Sterne
- 16
- Forks
- 4
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### TL;DR
In render_action_regexreplace.go, we call *Regexp.Expand() to expand a string like `hello ${person}` into `hello Alice`. Each `$whatever` represents a regex subgroup.
In some cases we might execute the same expansion (same input string, same subgroup values), and we might be able to save time by caching the results instead running the Expand operation again.
We should wait to do this until we have some evidence that our existing approach isn't fast enough.
### Detailed design
_No response_
### Alternatives considered
_No response_
### Additional information
_No response_
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.