Skip to content
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

reduce mem. usage of unused and update staticcheck #1063

Merged
merged 2 commits into from
May 3, 2020

Conversation

jirfag
Copy link
Member

@jirfag jirfag commented May 3, 2020

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

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
minReadSuccesses = attempts / 4

case "darwin":
// The filesystem on macOS 10.14 occasionally fails with "no such file or
Copy link
Contributor

Choose a reason for hiding this comment

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

😞 why can't we have nice things?

I like the "robustio" package though (interesting)

(Also, sorry for the noise; just glancing over the code changes, and learned about this macOS bug)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep.
Also, it's copy-pasted code from Go source

@jirfag jirfag mentioned this pull request May 3, 2020
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.

Great!
LGTM

@jirfag jirfag merged commit 52c9b88 into master May 3, 2020
@delete-merged-branch delete-merged-branch bot deleted the bug/fix-high-memory-usage-on-new-staticcheck branch May 3, 2020 12:20
@ldez ldez added the linter: update version Update version of linter label Dec 7, 2020
@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
linter: update version Update version of linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants