Perfomance: add preallocation for some slices (#59263)
add preallocation for some slices
This commit is contained in:
@@ -105,7 +105,7 @@ func (hs *HTTPServer) UpdateFolderPermissions(c *models.ReqContext) response.Res
|
||||
return apierrors.ToFolderErrorResponse(dashboards.ErrFolderAccessDenied)
|
||||
}
|
||||
|
||||
var items []*models.DashboardACL
|
||||
items := make([]*models.DashboardACL, 0, len(apiCmd.Items))
|
||||
for _, item := range apiCmd.Items {
|
||||
items = append(items, &models.DashboardACL{
|
||||
OrgID: c.OrgID,
|
||||
|
||||
Reference in New Issue
Block a user