{
  "id": 12593511,
  "title": "Faster streaming HTML with batches and aggregates",
  "url": "https://urgent.news/2026/10/07/faster-streaming-html-with-batches-and-aggregates",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-07T09:26:25.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://andersmurphy.com/2026/09/29/faster-streaming-html-with-batches-and-aggregates.html"
  },
  "original_language": "en",
  "account": "In this article, the author explores the benefits of server-based streaming HTML for faster web applications. The process involves generating the next version of the HTML page on the server and transmitting it to connected clients at regular intervals, typically every X milliseconds. This method of rendering, known as immediate mode, streamlines the rendering process and reduces the computational burden on the client-side.\n\nThe author emphasizes the importance of batching updates to minimize computational overhead and prevent accidental quadratic time complexity. By introducing barriers between the writing and rendering processes, the system can efficiently manage resources and optimize performance. Each batch of updates can be processed independently, with separate threads handling writes and renders to minimize contention and optimize resource utilization.\n\nCompression techniques, such as Brotli or Zstandard, are discussed for reducing the network overhead of transmitting HTML frames. The use of embedded databases, like SQLite, for projections further enhances performance by enabling quick querying of data. Despite the need to query the database on each tick, the author argues that the benefits of batching, compression, and efficient resource management outweigh these concerns.\n\nThe final bottleneck in the rendering process, as identified by the author, is HTML templating. To address this, the article introduces the concept of aggregates, which allow for automatic caching of rendering components. By wrapping components in a cache and keying their output by their function and arguments, the system can optimize rendering times and reduce redundant computations. This approach enables efficient rendering of shared widgets and dynamic content without compromising the system's performance in worst-case scenarios.",
  "summary": null,
  "key_points": [
    "Server-based streaming HTML reduces client-side computational burden.",
    "Batching updates minimizes computational overhead and quadratic time complexity.",
    "Aggregates enable automatic caching of rendering components for efficiency."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}