github.com/darianmavgo · darian@mavgo.com · About
Data Go / AG Grid Open Source

aggrid — SQLite Streaming Benchmarks

aggrid explores how to stream large SQLite datasets into AG Grid efficiently in React, Svelte, and vanilla JS. The Go backend streams rows over WebSocket and Server-Sent Events so the UI thread stays free.

go run ./cmd/server
npm run dev

Features

Benchmark suite and client implementations streaming SQLite query results into AG Grid across multiple frontend frameworks without UI freezing.

📊

AG Grid Integration

Implements AG Grid's infinite row model and viewport row model for real-time SQLite streaming.

Go Streaming Backend

Uses goroutines and channels to stream SQLite rows over WebSocket without blocking.

🧪

Multi-Framework

Benchmarks React, Svelte, and vanilla JS clients against the same Go streaming server.

📈

Frame-rate Monitoring

Built-in FPS counter and row-latency charts to measure UI thread impact during large data loads.

Documentation & Architecture

This project implements an Ag-Grid client that streams data from a large SQLite database without locking the UI.

Architecture

  • Server (go-server): A lightweight Go server using modernc.org/sqlite (no CGO) to serve rows from Index.sqlite via a simple REST API. It handles pagination and sorting.
  • Client (react-client): A React application using ag-grid-react and ag-grid-community (v32+). It uses the Infinite Row Model to fetch data in chunks as the user scrolls, ensuring high performance even with large datasets.

Features

  1. Sticky Headers: Native Ag-Grid support properly configured.
  2. Tight Column Sizing: optimized rowHeight and headerHeight and tight column definitions.
  3. Column Sort: Server-side sorting implemented for all columns.
  4. Streaming Data: Uses Infinite Row Model to lazy-load data.

How to Run

1. Start the Data Server

cd go-server
go run main.go
# Server listens on http://localhost:8080/rows

2. Start the Client

cd react-client
npm install
npm run dev
# Client listens on http://localhost:5173

Troubleshooting

  • If you see “No AG Grid modules are registered”, ensure ModuleRegistry.registerModules([AllCommunityModule]) is called in App.jsx.
  • If data doesn’t load, check that the Go server is running and Index.sqlite is accessible.