Blazor · .NET · WebAssembly
Blazor WebAssembly engineering
I'm Akshay Kulkarni (MaxRecursion), a senior software engineer in Pune, India. My day job is building .NET and Blazor WebAssembly applications for financial services, and outside it I measure how far Blazor can be pushed in the browser.
Where should a Blazor app's query engine live?
The same million-row, 25-column workload, the same queries and the same UI run in three real Blazor WebAssembly apps: duckdb-wasm in a Web Worker, DuckDB statically linked into the .NET runtime on the UI thread, and .NET itself running in a Web Worker. Application code stays C# behind one IQueryEngine interface, so only the topology changes.
What the measurements showed
- Running DuckDB in-process on the Blazor UI thread gave the fastest engine times, but blocked the UI for 1,793 ms during a 1,780 ms query, and the query could not be cancelled.
- Running duckdb-wasm in a Web Worker kept the page responsive and cancelled a running query in 74 ms.
- Statically linking DuckDB into the .NET WebAssembly runtime works: it cross-compiles in 132 seconds, and the wasm payload grows from 2.9 MB to 29.5 MB.
- Querying ZSTD Parquet instead of JSON is what makes in-browser analytics practical: 43.2 MB against 483 MB for the same million rows.
- Blazor is not supported on the multithreaded .NET runtime in any shipped version, so off-UI-thread work means a Web Worker.
Related .NET work
An ASP.NET Core service that turns an uploaded CSV into a Parquet file. Both files stream through disk, so input size is limited by disk rather than memory, and DuckDB does the conversion in a single COPY statement.
Day-to-day stack
- C#
- .NET
- ASP.NET Core Web API
- ASP.NET MVC
- Blazor WebAssembly
- WCF
- SQL Server
More about me on the home page, or see everything else I build.