<?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: rouguemuse</title>
    <description>The latest articles on DEV Community by rouguemuse (@contextmuse).</description>
    <link>https://dev.to/contextmuse</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3982569%2Feac1ae83-cf65-4173-bf72-7ce9191494c6.png</url>
      <title>DEV Community: rouguemuse</title>
      <link>https://dev.to/contextmuse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/contextmuse"/>
    <language>en</language>
    <item>
      <title>How I streamed Gigabytes of Data directly to Disk using the browser's File System API</title>
      <dc:creator>rouguemuse</dc:creator>
      <pubDate>Sat, 13 Jun 2026 11:12:34 +0000</pubDate>
      <link>https://dev.to/contextmuse/how-i-streamed-gigabytes-of-data-directly-to-disk-using-the-browsers-file-system-api-4jgg</link>
      <guid>https://dev.to/contextmuse/how-i-streamed-gigabytes-of-data-directly-to-disk-using-the-browsers-file-system-api-4jgg</guid>
      <description>&lt;p&gt;Generating massive datasets for database benchmarking used to require downloading C source code, installing a compiler, and running terminal commands. I wanted to build a web app that could generate standard 100-byte Sort Benchmark records instantly—with zero installation.&lt;/p&gt;

&lt;p&gt;But I immediately hit a wall: How do you generate 10 Gigabytes of data in a web browser without crashing the user's RAM?&lt;/p&gt;

&lt;p&gt;If you try to hold 10GB of strings in a JavaScript array, the browser tab will immediately run out of memory and crash.&lt;/p&gt;

&lt;p&gt;Here is how I solved it using the modern File System Access API.&lt;/p&gt;

&lt;p&gt;The Solution: Direct-to-Disk Streaming Instead of storing the generated text in memory, I built an engine that asks the user for a save location first using window.showSaveFilePicker().&lt;/p&gt;

&lt;p&gt;Once the browser creates a FileSystemWritableFileStream, my engine goes to work. It generates the data in small 1-Megabyte chunks, writes that chunk directly to the hard drive, and immediately flushes it from memory.&lt;/p&gt;

&lt;p&gt;The result? You can generate an infinite amount of data directly to your hard drive, and your browser's RAM usage never exceeds a few megabytes.&lt;/p&gt;

&lt;p&gt;Building the GenSort Engine Using this architecture, I ported the logic for the famous gensort benchmark tool into JavaScript. Now, anyone who needs to stress-test a database, build an ETL pipeline, or run a TeraSort benchmark can generate highly-specific dummy data directly from a website.&lt;/p&gt;

&lt;p&gt;You don't need a backend server. You don't need AWS hosting. 100% of the computation and file writing happens locally on the user's machine.&lt;/p&gt;

&lt;p&gt;Try it yourself You can test the generation engine here: &lt;a href="https://gen-sort-web-demo.vercel.app/" rel="noopener noreferrer"&gt;https://gen-sort-web-demo.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to look at how I structured the streaming API, I open-sourced the UI and the demo generator here: &lt;a href="https://github.com/rouguemuse/GenSort-web-demo" rel="noopener noreferrer"&gt;https://github.com/rouguemuse/GenSort-web-demo&lt;/a&gt;&lt;br&gt;
And if you want to bypass the demo limits and use the fully uncrippled source code for your own massive enterprise benchmarking, you can grab the Pro Source Code here: &lt;a href="https://contextmuse.lemonsqueezy.com/checkout/buy/93872964-d70e-4051-accb-3335206379d0" rel="noopener noreferrer"&gt;https://contextmuse.lemonsqueezy.com/checkout/buy/93872964-d70e-4051-accb-3335206379d0&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>dataengineering</category>
    </item>
  </channel>
</rss>
