Skip to content

gcexportdata.NewImporter: huge impact on performance #713

Closed
@ldez

Description

@ldez

Describe the bug

gcexportdata.Find has been rewritten:

gcexportdata.NewImporter uses gcexportdata.Find.

And revive uses gcexportdata.NewImporter:

return gcexportdata.NewImporter(fset, make(map[string]*types.Package))

To Reproduce
Steps to reproduce the behavior:

  1. update golang.org/x/tools to v0.1.12-0.20220628192153-7743d1d949f1
  2. build a binary
  3. clone https://github.com/kubernetes-sigs/cluster-api
  4. run the binary

Expected behavior
Run fast

Logs

Desktop (please complete the following information):

  • OS: Linux
  • Version of Go: all versions

Additional context

gcexportdata.NewImporter and gcexportdata.Find are now deprecated.

golangci/golangci-lint#2997 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions