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

os/user: cache the result of user.Current #11625

Closed
dsymonds opened this issue Jul 7, 2015 · 1 comment
Closed

os/user: cache the result of user.Current #11625

dsymonds opened this issue Jul 7, 2015 · 1 comment

Comments

@dsymonds
Copy link
Contributor

dsymonds commented Jul 7, 2015

user.Current can be expensive (e.g. taking tens of milliseconds when /etc/passwd.cache is big). Caching its result seems like an easy win since lots of disparate bits of code can end up trying to fetch it.

@dsymonds dsymonds added this to the Go1.6 milestone Jul 7, 2015
@rsc rsc unassigned Sajmani Nov 5, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Nov 5, 2015
@rsc rsc changed the title os/user: Cache the result of user.Current os/user: cache the result of user.Current Nov 5, 2015
@Sajmani Sajmani self-assigned this Nov 16, 2015
@gopherbot
Copy link

CL https://golang.org/cl/36391 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 6, 2018
@rsc rsc unassigned Sajmani Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants