{
  "id": 23811332,
  "title": "How we sped up Forester by 10x",
  "url": "https://urgent.news/2026/12/06/how-we-sped-up-forester-by-10x",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-06T10:25:27.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://www.forester-notes.org/K9UX/"
  },
  "original_language": null,
  "account": "Forester is a tool used for crafting, examining, and disseminating scientific and mathematical hypertexts. The OCaml 5 framework has been utilized by Forester since its inception, but the developers only started utilizing multicore programming capabilities once Forester 6 was released.\n\nThe release of Forester 6 brought about significant performance enhancements. To illustrate these improvements, the developers conducted benchmarking on Jon's private forest, which comprised 2430 trees, producing 1937 output files, two syndications of 25MB and 21MB, and 65 assets amounting to 108MB. By comparing the build times, the full creation of this forest sped up from 15.6 seconds to just 1.4 seconds.\n\nThe optimizations included single-threaded improvements, like enhanced caching, alongside the core multicore advancements. Forester converts a forest into a static website, comprising trees (assets with route-asset), non-tree files such as images or PDFs, and other elements like references, context, backlinks, related trees, and contributions. These components are generated via datalog queries.\n\nRendering, being the most resource-intensive step, saw a substantial boost thanks to parallelization. A significant fraction of the build time was spent running datalog queries for each tree, particularly in deep transclusion hierarchies. By caching these queries, the subsequent rendering phase was around 20 times quicker.\n\nAnother optimization involved parallelizing the rendering process. Since the datalog library isn't domain-safe, it necessitates duplicating the database for each domain using Datalog_engine.db_copy. This change, coupled with chunking the rendering workload based on tree size, ensured more efficient utilization of the system's resources.",
  "summary": null,
  "summary_source": "publisher",
  "key_points": [
    "Forester 6 release introduced multicore programming capabilities",
    "Build time for 2430-tree forest reduced from 15.6s to 1.4s",
    "Rendering phase sped up 20x through query caching and parallelization"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}