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

expvar: Map: excessive sorting in Add #33607

Closed
mbicz opened this issue Aug 12, 2019 · 3 comments
Closed

expvar: Map: excessive sorting in Add #33607

mbicz opened this issue Aug 12, 2019 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@mbicz
Copy link

mbicz commented Aug 12, 2019

It looks like Map is re-sorting the keys slice on every Add even though sorting is really needed for Do and introduces overhead for simple set operations.

This overhead is showing up in when profiling via pprof

image

I'm using go version go1.12.5 darwin/amd64

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance labels Aug 13, 2019
@dmitshur dmitshur added this to the Go1.14 milestone Aug 13, 2019
@jsign
Copy link
Contributor

jsign commented Sep 2, 2019

The required change to address this was merged here (PR #31418). Planned for 1.13.

@bcmills
Copy link
Contributor

bcmills commented Sep 3, 2019

@bemehow, is the problem you encountered resolved when using go1.13rc2?

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 3, 2019
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants