Skip to content

speed up a bit #1064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2020
Merged

speed up a bit #1064

merged 3 commits into from
May 5, 2020

Conversation

jirfag
Copy link
Contributor

@jirfag jirfag commented May 3, 2020

No description provided.

Copy link
Member

@ernado ernado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return es.build(&es.cfg.Linters, es.m.GetAllEnabledByDefaultLinters()), nil
}

func (es EnabledSet) GetOptimizedLinters() ([]*linter.Config, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave a comment on this method, it is not fully clear what Optimized means on first look.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, I've left a comment

jirfag added 3 commits May 5, 2020 18:26
The primary improvement is in early clearing of
analyzed package's TypeInfo, facts, etc for
whole program analyzers (`unused`). Clear it when it
becomes unused and GC collects them early. Initially this
clearing was performed for all analyzers except `unused`.

Update staticcheck from v0.0.1-2019.2.3 to v0.0.1-2020.1.4

Also in this commit:
  * speed up loading packages from export data (2.5s -> 2.1s for std)
    by not using mutex for export data since it was allowed in
    x/tools#07722704da13
  * make an order of execution of linters stable
  * update renameio and robustio
  * use robustio in caching

Relates: #987, #994, #995, #1011
Ensure that `unused` is always the last
in execution order. It can speed up packages loading
a bit.

Refactor enabled linters set to remove extra logging.

Relates: #944
@jirfag jirfag force-pushed the feature/speed-up-a-bit branch from 8d63291 to 505f837 Compare May 5, 2020 15:28
@jirfag
Copy link
Contributor Author

jirfag commented May 5, 2020

tests timeouted on mac os only.

@jirfag jirfag merged commit 279b6d6 into master May 5, 2020
@jirfag jirfag deleted the feature/speed-up-a-bit branch May 5, 2020 15:45
@ldez ldez added this to the v1.27 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants