The shocking part of this article, and many similar articles, is how deeply misuse of user data and cavalier privacy practices are baked into Facebook.
636 karma · joined March 16, 2012
The shocking part of this article, and many similar articles, is how deeply misuse of user data and cavalier privacy practices are baked into Facebook.
There's so much interesting work being done on static analysis in Go (semgrep, ruleguard, etc), but I haven't seen similarly powerful refactoring tools. Gopatch is one approach to building a refactoring power tool - I'm excited to start using it, but I hope that it also inspires people (and companies!) to build even more capable tools.
Also, if anyone reading isn't familiar with sampling profilers, Felix gave a great talk explaining them: https://github.com/felixge/talks/blob/master/fgprof/
In nearly all cases, there was plenty of room to make the Go service faster. A more careful choice of data structure and algorithm, finer-grained locking, fan-out across a goroutine pool, or just avoiding a zillion heap allocations solved most problems. I don't recall any cases where Go was simply incapable of meeting our performance needs.
As a side benefit, services with more stringent performance requirements often exposed inefficiencies in widely-used libraries. Optimizing those libraries made every Go service faster and cut our overall compute spend. Avoiding rewrites in C++ or Rust let those wins add up over time.
I'm always happy to see improvements to Go's profiling - the standard library's profiling is good, but it hasn't improved much since Go 1.0 (it took years just to get flame graphs integrated, and it's still near-impossible to get a usable dump of the in-memory object graph).
That said, I'm _very_ wary of tools that require a fork of the compiler and/or runtime. Uber's programming language research group is small (though mighty) and has a lot of demands on their time. Even over the medium term, it'll be hard to allocate time to keep this project current.
In the Go issue tracker, there's a long discussion [1] of the formal proposal [2] for these improvements. My understanding of the feedback is that the changes introduce too many Linux and x86-specific APIs. I'd love to see the author narrow the proposal to just improve timer fidelity when the OS exposes the PMU, without any new APIs. The more controversial proposal to collect richer platform- and architecture-specific data can be discussed separately.
Discussion [1]: https://github.com/golang/go/issues/36821
Proposal [2]: https://go.googlesource.com/proposal/+/refs/changes/08/21950...
Here's an example: https://github.com/augustgl/tiktok_source/blob/master/df_min...