Skip to content

Commit

Permalink
Merge pull request #68 from ibuildthecloud/master
Browse files Browse the repository at this point in the history
Performance enhance for large index results
  • Loading branch information
ibuildthecloud authored Mar 2, 2020
2 parents e5307ac + 2673c59 commit 7dee19f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/controller-gen/generators/type_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ func (c *{{.lowerName}}Cache) GetByIndex(indexName, key string) (result []*{{.ve
if err != nil {
return nil, err
}
result = make([]*{{.version}}.{{.type}}, 0, len(objs))
for _, obj := range objs {
result = append(result, obj.(*{{.version}}.{{.type}}))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/generic/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (c *Controller) enqueue(obj interface{}) {
utilruntime.HandleError(err)
return
}
c.workqueue.AddRateLimited(key)
c.workqueue.Add(key)
}

func (c *Controller) handleObject(obj interface{}) {
Expand Down

0 comments on commit 7dee19f

Please sign in to comment.