{
  "id": 6370480,
  "title": "Sloc Cloc and Code - Did I just get Buster Scrugged?",
  "url": "https://urgent.news/2026/09/09/sloc-cloc-and-code-did-i-just-get-buster-scrugged",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-09T01:13:32.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://boyter.org/posts/did-i-just-get-buster-scrugged/"
  },
  "original_language": "en",
  "account": "A recent github issue raised against the Scc tool, comparing it to another code counter, Mezura, sparked a deeper analysis. The original scc tool took longer to complete its task, processing around 86,000 files compared to Mezura's 67,000. Despite this, the performance gap wasn't justified. To investigate, the author ran the scc tool using strace, a diagnostic tool that shows system calls and signals. The results revealed that scc was making nearly 2.6 times more kernel calls compared to Mezura, even though it was only dealing with an extra 28% more files. This discrepancy was traced back to scc's file processing pipeline, which used a single goroutine for stat file processing, leading to a buildup of work in the queue. By introducing multiple goroutines to handle the workload, and switching from os.Open() to syscall.Open(), the number of futex calls dropped significantly, resulting in a faster runtime. This optimization also fixed some concurrency bugs. Further improvements included reducing the number of file system calls and optimizing the epoll process. These changes led to scc becoming faster than Mezura, and potentially other similar tools.",
  "summary": null,
  "key_points": [],
  "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."
}