<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chandrabhan Shekhawat</title>
    <description>The latest articles on DEV Community by Chandrabhan Shekhawat (@cbsshekhawat18).</description>
    <link>https://dev.to/cbsshekhawat18</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3976484%2F559ec38d-7c53-4244-81da-894b8dd955e6.jpg</url>
      <title>DEV Community: Chandrabhan Shekhawat</title>
      <link>https://dev.to/cbsshekhawat18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cbsshekhawat18"/>
    <language>en</language>
    <item>
      <title>AI and Your Privacy: What Really Happens to the Data You Paste ·</title>
      <dc:creator>Chandrabhan Shekhawat</dc:creator>
      <pubDate>Thu, 16 Jul 2026 21:39:33 +0000</pubDate>
      <link>https://dev.to/cbsshekhawat18/ai-and-your-privacy-what-really-happens-to-the-data-you-paste--2f93</link>
      <guid>https://dev.to/cbsshekhawat18/ai-and-your-privacy-what-really-happens-to-the-data-you-paste--2f93</guid>
      <description>&lt;p&gt;You’ve got a messy spreadsheet of customer emails, a confidential contract, or a chunk of your company’s code, and an AI chatbot that could sort it out in seconds. So you paste it in.&lt;/p&gt;

&lt;p&gt;Pause for a moment: &lt;strong&gt;where did that data just go?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This isn’t a “be scared of AI” article. It’s a “know what you’re doing” article — because the honest answer is it depends, and the difference matters a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paste is a send
&lt;/h2&gt;

&lt;p&gt;Here’s the mental model that fixes most privacy mistakes: with a cloud AI chatbot, pasting is uploading. The text doesn’t stay on your device. It travels to a company’s servers, gets processed there, and the reply travels back.&lt;/p&gt;

&lt;p&gt;That’s not sinister — it’s just how cloud software works. But it means the moment your data leaves your screen, it’s subject to that company’s policies, security, and jurisdiction, not yours. For a joke or a blog draft, who cares. For a client’s contract or a customer database, that’s a real decision you just made in half a second.&lt;/p&gt;

&lt;h2&gt;
  
  
  What providers may do with it
&lt;/h2&gt;

&lt;p&gt;Policies vary wildly between providers and between their free and paid tiers, so always check the specific one you use. But in general, be aware that pasted data may be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Retained for some period — for abuse monitoring, debugging, or support.&lt;/li&gt;
&lt;li&gt;2. Reviewed by humans in some cases, to improve the service.&lt;/li&gt;
&lt;li&gt;3. Used to train future models, depending on the product and your settings. Consumer/free tiers are more likely to do this; business and API tiers often don’t by default.
None of that is necessarily bad. But “I pasted our salary data into a free chatbot” is the kind of sentence that ends up in an incident report. Assume anything you paste into a cloud tool could be seen by someone else, and decide accordingly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The things you should basically never paste
&lt;/h2&gt;

&lt;p&gt;Regardless of provider, keep these out of chatbots unless you’re certain of the terms and have permission:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Secrets and credentials — API keys, passwords, tokens, private keys. If you’re sharing code to debug, strip these first. Our secret scanner catches keys and tokens hiding in a snippet before you share it.&lt;/li&gt;
&lt;li&gt;2. Personal data of other people — customer lists, health info, anything covered by privacy laws.&lt;/li&gt;
&lt;li&gt;3. Confidential or contractual material you don’t own the rights to share.&lt;/li&gt;
&lt;li&gt;4. Hidden metadata. Images quietly carry EXIF data — GPS location, device, timestamps. If you’re sharing a photo, run it through our metadata remover first so you’re not leaking where it was taken.
A good filter: If this leaked publicly tomorrow, would I be fine with it? If not, don’t paste it into a cloud tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;On-device beats cloud — when you can get it&lt;/strong&gt;&lt;br&gt;
Here’s the quiet superpower most people miss: not all “AI” or file work needs the cloud at all. A surprising amount can happen entirely inside your browser, on your own device, where the data never leaves.&lt;/p&gt;

&lt;p&gt;That’s the whole idea behind how we build Gigai’s tools: compressing an image, converting a PDF, cleaning metadata, formatting JSON — all of it runs locally in your browser, so your files are never uploaded, stored, or logged. &lt;a href="https://tools.gigaikripaservices.com/assist" rel="noopener noreferrer"&gt;Gigai Smart Assist&lt;/a&gt; works the same way: you hand it a file and a goal, and it does the work on your device. When something genuinely needs a server for a better result, the honest approach is to tell you and let you choose — not to quietly ship your data off.&lt;/p&gt;

&lt;p&gt;The principle generalizes: prefer the tool that processes locally. If two tools do the same job and one keeps your data on your machine, that one wins every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 30-second privacy checklist
&lt;/h2&gt;

&lt;p&gt;Before you paste anything into an AI tool, run this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Is it sensitive? Secrets, personal data, confidential material → stop.&lt;/li&gt;
&lt;li&gt;2. Whose data is it? If it’s not yours to share, don’t.&lt;/li&gt;
&lt;li&gt;3. Do I know this provider’s policy? Check whether free-tier inputs train the model; turn that off if you can.&lt;/li&gt;
&lt;li&gt;4. Could this be done on-device instead? If a local/browser tool does the job, use it.&lt;/li&gt;
&lt;li&gt;5. Would I be fine if this leaked? If not, keep it off the cloud.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The bottom line
&lt;/h2&gt;

&lt;p&gt;AI tools are genuinely useful, and you don’t need to be paranoid to use them. You just need to remember that convenience and privacy are a trade you’re making every time you paste — and make that trade on purpose.&lt;/p&gt;

&lt;p&gt;Know what leaves your device. Keep the sensitive stuff off the cloud. Prefer tools that process locally. Do that, and you get almost all of the upside with very little of the risk.&lt;/p&gt;

&lt;p&gt;New to how these systems actually work? &lt;a href="https://tools.gigaikripaservices.com/blog/how-large-language-models-work" rel="noopener noreferrer"&gt;Start with how large language models work&lt;/a&gt;, then read how to use AI without losing your own judgment — together they’ll make you calmer and sharper about the whole thing.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>privacy</category>
      <category>security</category>
    </item>
    <item>
      <title>Regular Expressions Without the Fear: A Working Mental Model</title>
      <dc:creator>Chandrabhan Shekhawat</dc:creator>
      <pubDate>Tue, 14 Jul 2026 08:33:33 +0000</pubDate>
      <link>https://dev.to/cbsshekhawat18/regular-expressions-without-the-fear-a-working-mental-model-158i</link>
      <guid>https://dev.to/cbsshekhawat18/regular-expressions-without-the-fear-a-working-mental-model-158i</guid>
      <description>&lt;p&gt;Regular expressions look like line noise and scare off people who would benefit most from them. With the right mental model, they become one of the most useful skills you can learn in an afternoon.&lt;/p&gt;

&lt;p&gt;Regular expressions have a reputation. To the uninitiated they look like a cat walked across the keyboard: ^\d{3}-\d{4}$ means something, apparently, but what? That intimidation keeps a lot of capable people from learning one of the highest-leverage skills in everyday computing. The truth is that regular expressions are not hard. They are just dense. Once you have the mental model, the density stops being scary and starts being useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a regular expression really is
&lt;/h2&gt;

&lt;p&gt;A regular expression, or regex, is a pattern that describes a shape of text. That is the whole idea. You are not writing code that runs step by step; you are describing what matching text looks like, and a matching engine finds every piece of text that fits the description.&lt;/p&gt;

&lt;p&gt;“A five-digit number.” “An email address.” “Any line that starts with a capital letter.” “The word 'colour' spelled either the British or American way.” Each of those is a shape, and each can be written as a pattern. When you read a regex, translate it back into a plain-English shape and it stops being noise.&lt;/p&gt;

&lt;p&gt;The handful of ideas that cover most cases&lt;br&gt;
You do not need the whole language to be productive. A small core does most of the work.&lt;/p&gt;

&lt;p&gt;Literal characters match themselves. The pattern "cat" matches the letters c, a, t in order.&lt;br&gt;
Character classes match one of a set. "[aeiou]" matches any single vowel; "\d" matches any digit.&lt;br&gt;
Quantifiers say how many. "+" means one or more, "*" means zero or more, and "{3}" means exactly three.&lt;br&gt;
Anchors tie the pattern to a position. "^" means the start, "$" means the end.&lt;br&gt;
Groups, written with parentheses, bundle parts together so a quantifier or an alternative applies to the whole bundle.&lt;br&gt;
With just those, ^\d{3}-\d{4}$ decodes cleanly: start, exactly three digits, a hyphen, exactly four digits, end. It is a phone-number-ish shape. Not so frightening once you read it in pieces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it pays off
&lt;/h2&gt;

&lt;p&gt;Regex earns its keep the moment you need to find, validate, or transform text at scale. Searching a large document for every date, or every email address, or every price. Validating that user input looks like a postcode or a URL before you accept it. Doing a find-and-replace that is smarter than an exact string, like “replace every run of multiple spaces with a single space.” Extracting the interesting fragments out of messy log files or exported data.&lt;/p&gt;

&lt;p&gt;Anywhere you would otherwise do the same tedious text edit fifty times by hand, a regex does it once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build patterns by describing, then testing
&lt;/h2&gt;

&lt;p&gt;The productive way to write a regex is not to type it perfectly from memory. It is to describe the shape you want, generate a first draft, and then test it against real examples, tightening as you go.&lt;/p&gt;

&lt;p&gt;Start by describing your target in words and letting the Regex Generator turn that description into a pattern. Then paste in real sample text and watch what matches, adjusting live, with the Regex Tester. The test-and-refine loop is where understanding actually forms; you learn far more from seeing why a pattern matched one line and missed another than from reading a reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  The traps worth knowing early
&lt;/h2&gt;

&lt;p&gt;Two mistakes catch everyone at first. The first is greediness: quantifiers grab as much as they can by default, so a pattern meant to match one short span can swallow half the line. The second is forgetting that some characters are special. A dot means “any character,” so to match a literal full stop you have to escape it. When a pattern behaves strangely, these two are the usual suspects.&lt;/p&gt;

&lt;p&gt;And one piece of wisdom the veterans share: do not try to validate genuinely complex formats, like every legal email address on earth, with one monstrous regex. Match the common, sensible shape and let the rare edge cases fall to other checks. A readable pattern that handles the real ninety-nine percent beats an unreadable one that theoretically handles everything and that no one, including you, can ever modify again.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;A skill that compounds&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example, from words to pattern
&lt;/h2&gt;

&lt;p&gt;Say you want to find every date written like 2026-03-14 in a document. Start by describing the shape in plain words: four digits, a dash, two digits, a dash, two digits. Now translate each piece. Four digits is "\d{4}". A literal dash is just a dash. Two digits is "\d{2}". Stitched together you get \d{4}-\d{2}-\d{2}, and reading it back confirms it matches the shape you described.&lt;/p&gt;

&lt;p&gt;Then test it against real lines and watch what happens. You will notice it also matches something like 99999-99-99, which is not a real date. If that matters, you tighten, perhaps by anchoring the pattern so it must sit on its own with "^" at the start and "$" at the end, or by narrowing the first digit. This is the whole loop: describe, draft, test, tighten. Doing it live in the Regex Tester is far more instructive than staring at the pattern, because you learn from watching exactly what it catches and what it lets through.&lt;/p&gt;

&lt;p&gt;Regex is one of those rare skills that pays off across every tool and language you will ever touch. Text editors, search boxes, spreadsheets, programming languages, and countless utilities all speak some dialect of it. Learn the small core once, practise by testing against real text, and you gain a quiet superpower: the ability to describe a shape of text and act on every instance of it at once. An afternoon of deliberate practice, and the line noise turns into a language you can read.&lt;/p&gt;

</description>
      <category>regex</category>
      <category>automation</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Built an AI Feature Without Using ChatGPT — Here’s Why</title>
      <dc:creator>Chandrabhan Shekhawat</dc:creator>
      <pubDate>Fri, 10 Jul 2026 03:45:00 +0000</pubDate>
      <link>https://dev.to/cbsshekhawat18/i-built-an-ai-feature-without-using-chatgpt-heres-why-2248</link>
      <guid>https://dev.to/cbsshekhawat18/i-built-an-ai-feature-without-using-chatgpt-heres-why-2248</guid>
      <description>&lt;p&gt;Artificial Intelligence is everywhere.&lt;/p&gt;

&lt;p&gt;Every new product proudly announces, “Powered by ChatGPT.”&lt;/p&gt;

&lt;p&gt;But when I started building AI features for real applications, I realized something important:&lt;/p&gt;

&lt;p&gt;ChatGPT isn’t the only way to build AI-powered software.&lt;/p&gt;

&lt;p&gt;In fact, some of the best AI features I’ve built don’t use ChatGPT at all.&lt;/p&gt;

&lt;p&gt;The Problem&lt;/p&gt;

&lt;p&gt;A client wanted an AI assistant inside their application.&lt;/p&gt;

&lt;p&gt;The obvious solution seemed simple:&lt;/p&gt;

&lt;p&gt;User → OpenAI API → Response&lt;/p&gt;

&lt;p&gt;It worked.&lt;/p&gt;

&lt;p&gt;Until we started asking the difficult questions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens if thousands of users use it simultaneously?&lt;/li&gt;
&lt;li&gt;What about API costs?&lt;/li&gt;
&lt;li&gt;Can users’ private data leave our servers?&lt;/li&gt;
&lt;li&gt;What if the internet is unavailable?&lt;/li&gt;
&lt;li&gt;Can we switch AI providers later?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions completely changed our architecture.&lt;/p&gt;

&lt;p&gt;AI Is Bigger Than One Model&lt;/p&gt;

&lt;p&gt;Many developers think AI equals ChatGPT.&lt;/p&gt;

&lt;p&gt;It doesn’t.&lt;/p&gt;

&lt;p&gt;ChatGPT is an application.&lt;/p&gt;

&lt;p&gt;The real building blocks are Large Language Models (LLMs), and today developers have several excellent choices.&lt;/p&gt;

&lt;p&gt;Depending on the project, we’ve used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenAI&lt;/li&gt;
&lt;li&gt;Google Gemini&lt;/li&gt;
&lt;li&gt;Gemini Nano&lt;/li&gt;
&lt;li&gt;Local models&lt;/li&gt;
&lt;li&gt;Hybrid AI architectures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each solves different problems.&lt;/p&gt;

&lt;p&gt;The Architecture We Chose&lt;/p&gt;

&lt;p&gt;Instead of connecting users directly to an AI model, we added an intelligent layer between them.&lt;/p&gt;

&lt;p&gt;User&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
Frontend&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
Backend API&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
Validation&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
Context Builder&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
AI Model&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
Response Validation&lt;br&gt;
    │&lt;br&gt;
    ▼&lt;br&gt;
User&lt;/p&gt;

&lt;p&gt;This gave us complete control.&lt;/p&gt;

&lt;p&gt;We could change prompts, validate input, sanitize sensitive data, cache responses, log errors, and even switch AI providers without changing the frontend.&lt;/p&gt;

&lt;p&gt;Why We Didn’t Depend on ChatGPT&lt;/p&gt;

&lt;p&gt;ChatGPT is an amazing product.&lt;/p&gt;

&lt;p&gt;But building production software requires thinking beyond one provider.&lt;/p&gt;

&lt;p&gt;By designing around an AI interface instead of a single API, we gained several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier model switching&lt;/li&gt;
&lt;li&gt;Better privacy controls&lt;/li&gt;
&lt;li&gt;Lower operational costs&lt;/li&gt;
&lt;li&gt;More predictable responses&lt;/li&gt;
&lt;li&gt;Better monitoring&lt;/li&gt;
&lt;li&gt;Future flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our application became AI-powered—not provider-dependent.&lt;/p&gt;

&lt;p&gt;One Feature Changed Everything&lt;/p&gt;

&lt;p&gt;One of my favorite implementations was an AI content assistant.&lt;/p&gt;

&lt;p&gt;Instead of asking users to write from scratch, the application generated structured drafts based on context already available inside the system.&lt;/p&gt;

&lt;p&gt;Users spent less time typing.&lt;/p&gt;

&lt;p&gt;The AI wasn’t replacing people.&lt;/p&gt;

&lt;p&gt;It was removing repetitive work.&lt;/p&gt;

&lt;p&gt;That’s where I think AI creates the most value.&lt;/p&gt;

&lt;p&gt;The Biggest Lesson&lt;/p&gt;

&lt;p&gt;The hardest part of building AI isn’t calling an API.&lt;/p&gt;

&lt;p&gt;It’s designing everything around it.&lt;/p&gt;

&lt;p&gt;The questions that matter are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What context should the model receive?&lt;/li&gt;
&lt;li&gt;What information should never reach the model?&lt;/li&gt;
&lt;li&gt;How should responses be validated?&lt;/li&gt;
&lt;li&gt;What happens when the AI is wrong?&lt;/li&gt;
&lt;li&gt;How do you measure quality over time?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are engineering problems—not AI problems.&lt;/p&gt;

&lt;p&gt;Looking Ahead&lt;/p&gt;

&lt;p&gt;The future of software isn’t about adding an “Ask AI” button to every screen.&lt;/p&gt;

&lt;p&gt;It’s about designing products where AI quietly helps users complete tasks faster, more accurately, and with less effort.&lt;/p&gt;

&lt;p&gt;Sometimes that means using OpenAI.&lt;/p&gt;

&lt;p&gt;Sometimes it means using Gemini.&lt;/p&gt;

&lt;p&gt;Sometimes it means running AI directly on the user’s device.&lt;/p&gt;

&lt;p&gt;The technology will continue to evolve.&lt;/p&gt;

&lt;p&gt;Good software architecture will always matter.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Final Thought&lt;/p&gt;

&lt;p&gt;The biggest mistake developers make is asking:&lt;/p&gt;

&lt;p&gt;“Which AI model should I use?”&lt;/p&gt;

&lt;p&gt;A better question is:&lt;/p&gt;

&lt;p&gt;“What problem am I trying to solve?”&lt;/p&gt;

&lt;p&gt;Once you answer that, choosing the right AI becomes much easier.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Django Mistake That Made My API 20 Slower (And How I Fixed It)</title>
      <dc:creator>Chandrabhan Shekhawat</dc:creator>
      <pubDate>Wed, 08 Jul 2026 20:43:44 +0000</pubDate>
      <link>https://dev.to/cbsshekhawat18/the-django-mistake-that-made-my-api-20x-slower-and-how-i-fixed-it-3ce6</link>
      <guid>https://dev.to/cbsshekhawat18/the-django-mistake-that-made-my-api-20x-slower-and-how-i-fixed-it-3ce6</guid>
      <description>&lt;p&gt;If you’ve been working with Django for a while, you’ve probably experienced this.&lt;/p&gt;

&lt;p&gt;Your API works perfectly in development.&lt;/p&gt;

&lt;p&gt;You test it with a few records.&lt;br&gt;
Everything feels fast.&lt;/p&gt;

&lt;p&gt;Then one day production data arrives.&lt;/p&gt;

&lt;p&gt;Suddenly an endpoint that used to respond in 300ms now takes 6–10 seconds.&lt;/p&gt;

&lt;p&gt;That happened to me.&lt;/p&gt;

&lt;p&gt;The Problem&lt;/p&gt;

&lt;p&gt;I had an API returning a list of companies along with their owners and projects.&lt;/p&gt;

&lt;p&gt;The code looked completely normal.&lt;/p&gt;

&lt;p&gt;companies = Company.objects.all()&lt;br&gt;
data = []&lt;br&gt;
for company in companies:&lt;br&gt;
    data.append({&lt;br&gt;
        "name": company.name,&lt;br&gt;
        "owner": company.owner.name,&lt;br&gt;
        "projects": [project.name for project in company.projects.all()]&lt;br&gt;
    })&lt;/p&gt;

&lt;p&gt;Nothing looked suspicious.&lt;/p&gt;

&lt;p&gt;Yet the endpoint became painfully slow as the database grew.&lt;/p&gt;

&lt;p&gt;What Was Actually Happening?&lt;/p&gt;

&lt;p&gt;Every time the loop executed, Django performed additional database queries.&lt;/p&gt;

&lt;p&gt;One query fetched the companies.&lt;/p&gt;

&lt;p&gt;Another query fetched the owner.&lt;/p&gt;

&lt;p&gt;Another query fetched the projects.&lt;/p&gt;

&lt;p&gt;If there were 500 companies, Django wasn’t executing 3 queries.&lt;/p&gt;

&lt;p&gt;It was executing more than 1,000 queries.&lt;/p&gt;

&lt;p&gt;This is known as the N+1 Query Problem.&lt;/p&gt;

&lt;p&gt;Many developers unknowingly ship this to production because everything appears fast with a small development database.&lt;/p&gt;

&lt;p&gt;How I Found It&lt;/p&gt;

&lt;p&gt;The first thing I checked wasn’t the Python code.&lt;/p&gt;

&lt;p&gt;It was the SQL queries.&lt;/p&gt;

&lt;p&gt;Using Django Debug Toolbar, I discovered the API was generating hundreds of nearly identical SQL statements.&lt;/p&gt;

&lt;p&gt;Instead of asking the database once, Django kept asking the same question repeatedly.&lt;/p&gt;

&lt;p&gt;The Fix&lt;/p&gt;

&lt;p&gt;The solution was surprisingly simple.&lt;/p&gt;

&lt;p&gt;Instead of letting Django fetch related objects one by one, I told it to fetch everything in advance.&lt;/p&gt;

&lt;p&gt;companies = (&lt;br&gt;
    Company.objects&lt;br&gt;
    .select_related("owner")&lt;br&gt;
    .prefetch_related("projects")&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;Now the rest of the code stayed exactly the same.&lt;/p&gt;

&lt;p&gt;No major refactoring.&lt;/p&gt;

&lt;p&gt;No caching.&lt;/p&gt;

&lt;p&gt;No Redis.&lt;/p&gt;

&lt;p&gt;Just better ORM usage.&lt;/p&gt;

&lt;p&gt;Why It Works&lt;/p&gt;

&lt;p&gt;select_related() performs SQL joins for ForeignKey and OneToOne relationships.&lt;/p&gt;

&lt;p&gt;prefetch_related() performs efficient separate queries for Many-to-Many and reverse relationships, then joins the data in Python.&lt;/p&gt;

&lt;p&gt;The result?&lt;/p&gt;

&lt;p&gt;Instead of executing hundreds of queries, Django executes only a handful.&lt;/p&gt;

&lt;p&gt;The Result&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1,043 SQL queries&lt;/li&gt;
&lt;li&gt;Response time: 8.4 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 SQL queries&lt;/li&gt;
&lt;li&gt;Response time: 320ms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s more than a 20× improvement without changing the database schema or adding any caching.&lt;/p&gt;

&lt;p&gt;When Should You Use It?&lt;/p&gt;

&lt;p&gt;Use select_related() for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ForeignKey&lt;/li&gt;
&lt;li&gt;OneToOneField&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use prefetch_related() for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ManyToManyField&lt;/li&gt;
&lt;li&gt;Reverse ForeignKey relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choosing the right method can dramatically reduce database traffic.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;One of the biggest lessons I’ve learned after years of building Django applications is this:&lt;/p&gt;

&lt;p&gt;Performance problems often aren’t caused by slow databases.&lt;/p&gt;

&lt;p&gt;They’re caused by asking the database the same question hundreds of times.&lt;/p&gt;

&lt;p&gt;Before introducing caching, Redis, Celery, or expensive infrastructure, inspect your SQL queries.&lt;/p&gt;

&lt;p&gt;Sometimes the biggest performance improvement comes from changing a single line of Django ORM code.&lt;/p&gt;

&lt;p&gt;⸻&lt;/p&gt;

&lt;p&gt;Have you ever encountered an N+1 query problem in Django? I’d love to hear how you discovered it and what you did to fix it.&lt;/p&gt;

</description>
      <category>api</category>
      <category>django</category>
      <category>performance</category>
      <category>python</category>
    </item>
    <item>
      <title>Gigai Tools — Every tool you need, in one place.</title>
      <dc:creator>Chandrabhan Shekhawat</dc:creator>
      <pubDate>Sat, 04 Jul 2026 06:32:01 +0000</pubDate>
      <link>https://dev.to/cbsshekhawat18/gigai-tools-every-tool-you-need-in-one-place-49ba</link>
      <guid>https://dev.to/cbsshekhawat18/gigai-tools-every-tool-you-need-in-one-place-49ba</guid>
      <description>&lt;p&gt;Gigai Tools is a free, all-in-one platform of 240+ online tools that run entirely in your browser — no sign-up, no watermarks, and nothing to install.&lt;/p&gt;

&lt;p&gt;Instead of juggling a dozen different websites, you get everything in one place across nine categories:&lt;/p&gt;

&lt;p&gt;Link :- &lt;a href="https://tools.gigaikripaservices.com/" rel="noopener noreferrer"&gt;https://tools.gigaikripaservices.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🖼️ Image — compress, convert, resize, crop, remove backgrounds&lt;br&gt;
📄 PDF — merge, split, compress, edit text, convert, sign, protect&lt;br&gt;
💻 Developer — JSON/SQL/HTML formatters, JWT decoder, hash &amp;amp; UUID generators, regex tester&lt;br&gt;
🔳 QR Code — a full QR studio with logos, colors, WiFi/vCard/UPI codes, plus a scanner&lt;br&gt;
🔍 Website &amp;amp; SEO — meta tags, schema markup, sitemaps, robots.txt, SERP preview&lt;br&gt;
✒️ SVG — optimize, convert to React/CSS, generate blobs, waves and patterns&lt;br&gt;
📁 Document — CSV/Excel/Markdown converters, viewers and editors&lt;br&gt;
🎬 Video — compress, convert, trim, and turn videos into GIFs&lt;br&gt;
🎧 Audio — trim, convert, record, make ringtones and more&lt;br&gt;
What makes Gigai Tools different is privacy: because the tools process your files locally in your browser, your images, PDFs and data never get uploaded to a server. That means it's faster (no waiting on uploads), safe even for sensitive files, and there are no accounts, no limits, and no ads inside the workspace.&lt;/p&gt;

&lt;p&gt;Whether you're a developer formatting JSON, a designer optimizing SVGs, a marketer building QR campaigns, a student converting documents, or someone who just needs to compress a PDF once — Gigai Tools gives you a fast, clean, privacy-first toolkit that just works.&lt;/p&gt;

&lt;p&gt;Free forever. No sign-up. 240+ tools and growing.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
