refactor(baseapp): when the capacity is determined, avoid memory copying (#20200)
This commit is contained in:
parent
a6871c74c3
commit
6828584424
@ -462,7 +462,7 @@ func (app *BaseApp) setTrace(trace bool) {
|
||||
}
|
||||
|
||||
func (app *BaseApp) setIndexEvents(ie []string) {
|
||||
app.indexEvents = make(map[string]struct{})
|
||||
app.indexEvents = make(map[string]struct{}, len(ie))
|
||||
|
||||
for _, e := range ie {
|
||||
app.indexEvents[e] = struct{}{}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user