How to Profile and Speed Up Python Code: cProfile, py-spy, lru_cache
Find the slow line before you change anything. Use cProfile, line_profiler, and py-spy to locate the hotspot, then…
Category
Backend development is the server-side work behind an application: APIs, business logic, databases, queues and background jobs. Backend engineers pick languages such as Java, Python, Node.js or C#, decide how data is stored and how services talk to each other, and keep it all fast and correct under load. Most of the hard calls are trade-offs, such as SQL against NoSQL or a monolith against microservices.
177 articles
Find the slow line before you change anything. Use cProfile, line_profiler, and py-spy to locate the hotspot, then…
Executive Summary: Parallel streams split work across the shared ForkJoinPool, and they only help under specific conditions. I…
Message queues in system design: the at-least-once vs exactly-once delivery comparison, message ordering, and the dead letter queue…
Build typed ORM models, manage sessions and transactions, query with select(), and count your queries to catch the…
Executive Summary: Java streams end in a value through reduce or collect. I cover reduce with an identity…
Run one benchmark and see the GIL for yourself: threads speed up waiting, processes speed up computing. Learn…
Executive Summary: A Java stream is a one-use, lazy pipeline over a source such as a collection, array,…
Microservices architecture explained: service boundaries and bounded contexts, the microservices trade-offs in both directions, and honest guidance on…
Learn how to disable the WordPress core sitemap generator and why it might be beneficial for your website,…
Executive Summary: A Java lambda implements the single abstract method of a functional interface. I cover the standard…
Learn how the event loop runs coroutines, how tasks and TaskGroup give you concurrency, and how to handle…
Executive Summary: Create a custom Java exception when a failure has domain meaning that callers need to handle…
Python 3.11 is faster, points at the exact expression that failed, and adds exception groups, TaskGroup, and tomllib.…
Executive Summary: Every Java exception descends from Throwable, split into Errors, checked exceptions, and unchecked RuntimeExceptions. I cover…