---
title: "Tech Tip #37: Don't block on a hot path"
description: "Your server is burning power just waiting."
url: https://greencode.ai/tech-tips/37-dont-block-the-hot-path/
---

# Tech Tip #37: Don't block on a hot path

**Your server is burning power just waiting.**

[Watch the video](https://media.greencode.ai/shorts/dont-block-the-hot-path-b419bc0a293d.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Synchronous calls to slow services on busy paths hold threads and whole machines while nothing happens. To keep up, teams add servers that also mostly wait.

### The fix you can use today

- Use async I/O for network and disk calls on busy paths.
- Move slow, non-urgent work to a queue and a background worker.
- Match the concurrency model to the work: async for I/O-bound, processes for CPU-bound.

GreenCode researchers list blocking calls on busy code paths as an energy waste to fix.

### Tools that help

- [GreenCode Constitution skill](https://greencode-constitution.org/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): open-source energy principles and a catalogue of 37 energy anti-patterns that an AI coding agent can follow to find and fix waste like this
- [Scaphandre](https://github.com/hubblo-org/scaphandre?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): measures the power drawn by each process on a Linux server and exports it to Prometheus and other monitoring stacks

### How GreenCode helps

GreenCode helps tackle this by generating a load test from your system's own endpoints. It records energy as well as speed while it runs, and ranks the hotspots by the energy they use. [More on this](https://greencode.ai/feature/automated-performance-testing/).

### Tags

#performance#networking

### Sources

- [GreenCode Constitution (Kapenekakis et al., GreenAI workshop, ECML PKDD 2026): blocking I/O on hot paths in Tier 2](https://greencode.ai/publications/greencode-constitution-agent-principles-for-optimizing-code-and-llm-inference-en/)
- [GreenCode Constitution skill, energy anti-patterns: H1 synchronous blocking I/O and H11 synchronous batch work](https://greencode-constitution.org/skill.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [Green Software Foundation, Green Software Patterns: Use asynchronous network calls instead of synchronous](https://github.com/Green-Software-Foundation/patterns/blob/main/docs/development/use-async-instead-of-sync.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/)

#### Key Facts

- Tip **#37**
- For **Developers**
- Category **Code efficiency**
- Format **short video**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
