Perfomance: add preallocation for some slices (#59263)

add preallocation for some slices
This commit is contained in:
Denis Limarev
2022-11-28 13:10:24 +01:00
committed by GitHub
parent 254577ba56
commit b814c66c1d
8 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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,