<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Yasser Shkeir]]></title><description><![CDATA[Yasser Shkeir]]></description><link>https://yassershkeir.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 22:05:24 GMT</lastBuildDate><atom:link href="https://yassershkeir.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[19× throughput on one public Django-Bolt route with Rust on master]]></title><description><![CDATA[On Django-Bolt’s master branch, one public 10-row PostgreSQL route went from 2,915 requests/sec on stock Bolt to 55,601 with Quickset’s Rust executor. The…]]></description><link>https://yassershkeir.hashnode.dev/i-moved-one-django-bolt-read-route-to-rust-and-got-19-the-throughput-on-master</link><guid isPermaLink="true">https://yassershkeir.hashnode.dev/i-moved-one-django-bolt-read-route-to-rust-and-got-19-the-throughput-on-master</guid><category><![CDATA[Django]]></category><category><![CDATA[Python]]></category><category><![CDATA[Rust]]></category><category><![CDATA[postgres]]></category><category><![CDATA[Open Source]]></category><dc:creator><![CDATA[Yasser Shkeir]]></dc:creator><pubDate>Thu, 03 Dec 2026 14:47:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b117e785da8e8dcc152c67f/5ea56226-9f6c-4ef2-bc28-b3ca4cb77688.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>On Django-Bolt’s master branch, one public 10-row PostgreSQL route went from 2,915 requests/sec on stock Bolt to 55,601 with Quickset’s Rust executor. The responses matched byte for byte. This path bypasses Python middleware and authentication. On released Bolt 0.13.0, the same public route went from 2,745 to 5,499 requests/sec with Quickset’s Python path. Both benchmarks used one server process on my laptop.</p>
<p>Today I released quickset, an open-source add-on for Django-Bolt.</p>
<p><strong>What it does.</strong> A Django route that returns a QuerySet builds and compiles that QuerySet for every request. The SQL is almost always the same text. quickset records it once, when the server starts, and serves each request from the recording. On an eligible route that already uses Django-Bolt, change its decorator:</p>
<pre><code class="language-python">@quickset.get("/articles")
async def list_articles(min_score: int = 0) -&gt; list[ArticleOut]:
    return Article.objects.filter(published=True, score__gte=min_score).order_by("id")
</code></pre>
<p><strong>What it gives.</strong> I also ran plain Django on the same laptop with one worker. The first two figures below share a run. The Quickset figure comes from the paired 2,745-to-5,499 run above.</p>
<ul>
<li>Django alone, on gunicorn: 1,875 requests a second</li>
<li>Django-Bolt: 2,743</li>
<li>Django-Bolt and quickset: 5,499</li>
</ul>
<p>The Rust executor is opt-in for public reads. Routes that need authentication stay on the Python path. With event-loop reads enabled in Python on Django-Bolt’s master branch, Bolt went from 4,209 to 14,713 requests/sec with Quickset. The recording below shows separate, shorter runs on master.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6b117e785da8e8dcc152c67f/29a574e3-275c-4219-ae79-fd11fb871ed8.gif" alt="Terminal demo on Django-Bolt master. Three short runs compare the read paths and show matching response hashes." style="display:block;margin:0 auto" />

<p><strong>What it will not do.</strong> Quickset compares the SQL Django produces for sample inputs and checks the route’s source. It declines routes that read the clock or use unsupported operations. Sampling can miss an edge case. The tests compare response bytes across all three paths, and <code>python manage.py quickset check</code> explains why a route stays on the ORM.</p>
<p><strong>The limits.</strong> Django-Bolt only, reads only, version 0.1. I built it with a lot of help from an AI coding assistant, which is why the checks matter more than my word.</p>
<pre><code class="language-bash">pip install django-quickset
</code></pre>
<p>Repository, example and benchmark: <a href="https://github.com/YasserShkeir/quickset">https://github.com/YasserShkeir/quickset</a></p>
<p>I will write up how the recording works, and the surprising ways Django changes its SQL, next week.</p>
]]></content:encoded></item></channel></rss>