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/servernpm run devFeatures
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 usingmodernc.org/sqlite(no CGO) to serve rows fromIndex.sqlitevia a simple REST API. It handles pagination and sorting. - Client (
react-client): A React application usingag-grid-reactandag-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
- Sticky Headers: Native Ag-Grid support properly configured.
- Tight Column Sizing: optimized
rowHeightandheaderHeightand tight column definitions. - Column Sort: Server-side sorting implemented for all columns.
- 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 inApp.jsx. - If data doesn’t load, check that the Go server is running and
Index.sqliteis accessible.
Related Projects
More from the Mavgo ecosystem