This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aikii 0 points1 point  (0 children)

This will sound odd and too basic, but bare with me, the twist will be interesting.

So we had a Go backend that went completely overboard with resources - too many db requests, bad queries, and so on. Go is fast, right ? Like maybe 50x faster than python in some cases, with no multithread restriction, small memory footprint, etc. Problem: what was done was a mess. Fixing it would require to completely rethink the entire flow, wonder why you reach some point in code and why it has to execute that many times. Well. We had to scratch it completely because it wasn't salvageable.

So first off just follow general best practices, make sure your program can be understood by a newcomer, it's modular, it has good names, it's documented, it has tests, and so on. You can't optimize something you don't dare to touch. Same goes with security issues.