Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
consensual poster
Sep 1, 2009

Pham Nuwen posted:

Plus, this is superseding dep, which made some people buttmad, so I don't blame him for exhaustively documenting how it handles corner cases etc. to keep them from bitching

I'll admit that I'm mad about the change away from dep. Not because I'll miss the mediocrity of dep, but because I have no faith that the Go team can pick a dependency management solution and actually stick with it. They should have had a proper dependency management system in place before releasing Go 1.0, but it took them something like 4 or 5 years after 1.0 to even decide that they needed something like dep.

I generally enjoy programming in Go, but the fact that I have to spend mental cycles on something that should have been solved long ago is making me really salty.

Adbot
ADBOT LOVES YOU

consensual poster
Sep 1, 2009

Twerk from Home posted:

I'm having mysteriously bad HTTPS serving performance, specifically TLS handshakes. Real applications are using the http.ListenAndServeTLS, right? I profiled my application and... it's spending all of its time doing TLS handshakes on a simulated load that we believe represents realistic traffic.

This is running on AWS, in ECS behind an ALB, but I'm under a contractual requirement to encrypt all traffic end to end, so the service needs its own self-signed cert. Any suggestions before I bolt on a sidecar proxy that will terminate SSL inside the same ECS task? That sounds like more headache than I want right now, and I'm disappointed that NodeJS seems to be able to TLS handshake significantly more efficiency than Go's built in http server.



There appears to be an open issue related to what you're seeing: https://github.com/golang/go/issues/20058

Have you tried using ECDSA instead of RSA for your certs? Discussion in that issue seems to indicate that would speed up the handshake quite a bit.

consensual poster
Sep 1, 2009

cruft posted:

Can some kind soul help me out here

code:
type Attendee struct {
	Email string
	Username string
}

type AttendeeList struct {
	Attendees []Attendee
	ByEmail map[string]Attendee
	ByUsername map[string]Attendee
}
Should I make the Attendee members of AttendeeList pointers?

I'm pretty sure the actual answer is "LOL it's not 1987 you have enough RAM to not care", but it's the principle of the thing, you see.

Memory usage is not the only consideration. Using pointers, you can modify an attendee and you'll see the update no matter how you access that Attendee.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply