perf: preallocate options map in drawRulerFile (#2469)

This commit is contained in:
CatsDeservePets authored and GitHub committed 2026-03-25 16:55:04 +01:00
1 parent 2e724a98db
commit 6d5b9f924e
1 file changed
+1 -1
+1 -1
View File
@@ -952,9 +952,9 @@ func (ui *ui) drawRulerFile(nav *nav) {
mode = "VISUAL"
}
options := make(map[string]string)
v := reflect.ValueOf(gOpts)
t := v.Type()
options := make(map[string]string, v.NumField())
for i := range v.NumField() {
name := t.Field(i).Name
switch name {