Profiling Python in Production
nylas.com
nylas.com
- https://blogs.dropbox.com/tech/2012/07/plop-low-overhead-pro...
* reduces power usage, wear and tear on hardware
* gives more capacity for traffic surges
* gives more headroom for new features
* enables running on a smaller instance
This isn't an argument against slow code, more of a suggestion to tune out unnecessary work.
It's great in theory until the AWS bill arrives. Often times it's still fine, just depends where the bottom line is.
* We generally favor free/open source solutions where practical.
* It is quite a bit cheaper in dollar terms.
* The actual code to make this work is very lightweight. By doing it yourself, you have total control, and can extend or tweak to get exactly the data you want. Being able to easily add bespoke instrumentation is really powerful. To give an example from one of our use cases (IMAP sync), let's say you wanted to cohort your data by mail provider. I.e., you suspect that the workload profile when syncing against server A is significantly different than syncing against server B, and you want to know for sure. It's pretty easy to take your codebase and your instrumentation, and add that by inspecting some thread-local context at runtime. Might be hard to do with an off-the-shelf commercial tool.
In what context is 30k LOC a large application ? 30k LOC is small enough that one programmer can write and easily have an overview of the entire codebase. Maybe it's a typo and it's 300k LOC