spark is a performance profiling plugin/mod for Minecraft clients, servers, and proxies.
This repository contains the website & viewer for spark, written using Next.js/React/Typescript.
The website contains:
- a brief homepage
- downloads page which serves direct links to the latest release
- documentation, although this is managed in a separate repository
- a viewer web-app for spark data, which has modes for:
- viewing the output from the spark profiler
- viewing the output from spark heap dump summaries
The viewer component of the website reads data from bytebin (content storage service) and bytesocks (WebSocket server). It then renders this data as an interactive viewer in which the user can interpret and analyse their results.
The profile viewer renders the data as an expandable call stack tree, with support for applying deobfuscation mappings, searching, bookmarks and viewing as a flame graph.
The heap dump summary viewer renders a histogram of the classes occupying the most memory at the time when the data was collected.
To configure the URLs used by the application, you have to pass them as environment variables when building the application. In the special case of using Docker, you have to pass them as build arguments.
For more information, see env.ts and the Dockerfile.
Yes please! - but please open an issue or ping me on Discord (so we can discuss your idea) before working on a big change!
spark is free & open source. It is released under the terms of the GNU GPLv3 license. Please see LICENSE.txt for more information.
spark is a fork of WarmRoast, which was also licensed using the GPLv3.
This fork adds an Export Analysis feature to the sampler viewer, allowing users to export structured diagnostic data alongside the original sparkprofile.
When viewing a sampler profile, the control bar now shows three export buttons:
| Button | File | Description |
|---|---|---|
| Summary | <code>.spark-summary.json |
Compact diagnostic report (~21KB). LLM-friendly, contains top methods, hot thread call trees, worst time windows, TPS/MSPT/GC stats, evidence stacks, and inferred signals. |
| Full | <code>.spark-full.jsonl |
Complete aggregate data (JSONL). Per-thread, per-method, per-window aggregations for programmatic analysis. |
| Original | <code>.sparkprofile |
The original binary sparkfile (existing behavior). |
src/viewer/sampler/export/— Core export modulesExportModel.ts— Neutral data model, independent of viewer internalsSummaryTypes.ts— TypeScript types for the summary schema (spark_summary.v1)SummaryGenerator.ts— DFS-based aggregation + pruned call tree generationSparkViewerAdapter.ts— Single adapter layer mapping viewer'sSamplerDatato export modelExportAnalysisWorker.ts— Comlink worker for off-main-thread generationRemoteExportAnalysisWorker.ts— Worker proxy using Comlink
src/viewer/sampler/components/controls/AnalysisExportButton.tsx— React component with three export buttons
The export feature is designed as an isolated extension. When pulling upstream spark-viewer updates:
- No changes needed in
SummaryGenerator.tsorExportModel.tsunless the neutral model needs updating - Update only
SparkViewerAdapter.tsif the viewer'sSamplerDatashape changes - Re-add
AnalysisExportButtoninControls.tsxif the controls layout changes
See UPSTREAM_COMPATIBILITY.md for the detailed maintenance workflow.
