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

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

## 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)

### Transcript

Your server is burning power just waiting. On busy code paths, some calls wait for a slow service to answer. While they wait, they hold a thread, and the machine around it. Nothing useful happens. To keep up, teams add more servers. And those servers mostly wait too. Here is the fix you can use today. Use async calls for network and disk work on busy paths. Move slow work that is not urgent to a queue and a background worker. Match the model to the work: async for waiting, processes for heavy sums. GreenCode researchers list blocking calls on busy code paths as an energy waste to fix. GreenCode's Constitution skill can guide an AI coding agent to fix these calls. Then check each program's power draw, using tools like Scaphandre. GreenCode helps tackle this by load testing your system through its own endpoints. It records energy as well as speed, and ranks hotspots by energy. That was GreenCode Tech Tip number thirty-seven. Follow for the next tip, and find more on greencode.ai/tech-tips.

[The tip in full](https://greencode.ai/tech-tips/37-dont-block-the-hot-path/)

[« Tech Tip #36: Let quiet services scale to zero](https://greencode.ai/shorts/36-scale-to-zero/)[Tech Tip #38: Not everything is worth optimising »](https://greencode.ai/shorts/38-not-everything-is-worth-optimising/)

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

#### Key Facts

- Tip **#37**
- For **Developers**
- Length **1:08**
- Category **Code efficiency**
![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/)
