Django LiveView Survives DOOM: Pushing 600k Divs/Second in Real-Time Rendering Test
Share this article
When developers want to test the limits of web frameworks, they don't settle for simple benchmarks—they unleash the forces of hell. Literally. In an audacious stress test, a developer ran the classic game DOOM inside Django using the LiveView framework, pushing the system to render 600,000 div elements per second.
The experiment used ViZDoom—a popular reinforcement learning environment—to generate game frames at 100x100 pixel resolution. Each frame was processed by Django's template engine, converting individual pixels into colored <div> elements. Django LiveView then pushed these elements to connected browsers via WebSocket, while CSS handled the final positioning:
ViZDoom → Generates frame
Django → Converts frame to 10,000 divs
LiveView → Streams divs to browsers
CSS → Arranges pixels
Running at 60 frames per second, this pipeline sustained a staggering 600,000 div updates per second. The implementation also supported real-time broadcasting, allowing multiple players to view synchronized gameplay simultaneously—a testament to LiveView's pub/sub capabilities.
"It was a ridiculous and fun experiment that proves this framework can handle pretty much anything you throw at it," noted the developer behind the test.
While impractical for production (due to bandwidth and DOM manipulation costs), the test validates LiveView's robustness in extreme scenarios. For context, traditional virtual DOM libraries like React would likely buckle under this raw pixel-pushing approach.
Developers can examine the source code on GitHub under an Attribution-NonCommercial-NoDerivatives 4.0 license. As the developer quipped: "Now go build something cool without Doom Slayer."
Source: DOOM in Django: Testing the Limits of LiveView at 600,000 Divs/Segundo by Andros Dev