mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 07:42:23 +08:00
Performance: add preallocation for some slice/map (#57860)
This change preallocates slices and maps where the size of the data is known before the object is created. Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
This commit is contained in:
@ -59,7 +59,7 @@ func (value *FrontendSentryExceptionValue) FmtStacktrace(store *SourceMapStore)
|
||||
}
|
||||
|
||||
func (exception *FrontendSentryException) FmtStacktraces(store *SourceMapStore) string {
|
||||
var stacktraces []string
|
||||
stacktraces := make([]string, 0, len(exception.Values))
|
||||
for _, value := range exception.Values {
|
||||
stacktraces = append(stacktraces, value.FmtStacktrace(store))
|
||||
}
|
||||
|
Reference in New Issue
Block a user