DEV Community

Cover image for GPU-Accelerated Indexed DB Replacement Using WebGPU in JavaScript
dgriebel2014
dgriebel2014

Posted on

GPU-Accelerated Indexed DB Replacement Using WebGPU in JavaScript

VideoDB: A GPU-Accelerated Data Storage Library

Hi everyone,

I’d like to share a personal project called VideoDB. It’s a small TypeScript/JavaScript library that uses WebGPU to store data directly in GPU memory (VRAM) instead of the usual system memory. Think of it like a lightweight IndexedDB for the browser, but GPU-accelerated.

Key Points

  • High Throughput: With 1KB rows, add operations can reach ~500K rows/sec (~500 MB/s) depending on the data type. Batched reads can exceed ~200K gets/sec.
  • Supports JSON & Typed Arrays: You can store arbitrary JSON or binary data, including typed arrays.
  • Deferred Writes: Writes are batched to minimize overhead.

I’ve also put together a demo page that shows how to:

  • Create stores
  • Add data
  • Fetch data
  • Run stress tests

The page includes full class documentation, usage examples, and features like importing JSON datasets from data.gov, loading them into your GPU, and viewing them in a grid with paging.

Check out the demo here!

Thanks for taking a look! This is a free tool with no advertising or "premium" membership levels.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay