<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Performance on Kuldeep Pisda</title><link>https://kdpisda.in/tag/performance/</link><description>Recent content in Performance on Kuldeep Pisda</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 21 Apr 2026 10:00:00 +0530</lastBuildDate><atom:link href="https://kdpisda.in/tag/performance/index.xml" rel="self" type="application/rss+xml"/><item><title>Taming Elasticsearch Reindex Storms in Django</title><link>https://kdpisda.in/taming-elasticsearch-reindex-storms-django/</link><pubDate>Tue, 21 Apr 2026 10:00:00 +0530</pubDate><guid>https://kdpisda.in/taming-elasticsearch-reindex-storms-django/</guid><description>&lt;p&gt;The first time I saw it, a founder saved their startup profile and Elasticsearch fell over.&lt;/p&gt;
&lt;p&gt;Not literally — but close enough that the web request timed out and the search index spent the next several minutes catching up. One &lt;code&gt;save()&lt;/code&gt; in Django had quietly fanned out into thousands of individual index operations. I&amp;rsquo;d wired the search layer up the textbook way, the way every &lt;code&gt;django-elasticsearch-dsl&lt;/code&gt; tutorial shows you, and it worked beautifully right up until the data model got interesting. This is the story of how I stopped reindexing per record and started reindexing in batches — and the pitfalls that pattern hides.&lt;/p&gt;</description></item><item><title>From 30 Seconds to 200ms: The Django Queries Nobody Asked For</title><link>https://kdpisda.in/dynamic-api-fields-and-query-optimization-django/</link><pubDate>Sat, 21 Mar 2026 10:00:00 +0530</pubDate><guid>https://kdpisda.in/dynamic-api-fields-and-query-optimization-django/</guid><description>&lt;p&gt;With the ERP&amp;rsquo;s permissions now defined from a screen instead of a deploy (chapter 9), the platform had crossed a line I could feel: the content team, the department heads, and the booking staff were all self-serving from the same Django backend without filing a ticket. It was doing real work for real people. And then, quietly, it started doing that work slowly.&lt;/p&gt;
&lt;p&gt;The complaints didn&amp;rsquo;t arrive as a crash. They arrived as a shrug. &amp;ldquo;The courses page takes a while to load.&amp;rdquo; &amp;ldquo;The admin list just spins.&amp;rdquo; On a good connection the course listing came back in three or four seconds — annoying but survivable. On a mid-range Android phone on 4G in a small town, which is &lt;em&gt;most&lt;/em&gt; of our users, the same endpoint could take &lt;strong&gt;twenty to thirty seconds&lt;/strong&gt; before the first byte. That is well past the point where a user assumes the app is broken and closes it. We were losing people not to a bug, but to a spinner.&lt;/p&gt;</description></item></channel></rss>