__                 _ _                _
  / _| ___   ___   __| | |__   __ _ _ __| | __
 | |_ / _ \ / _ \ / _` | '_ \ / _` | '__| |/ /
 |  _| (_) | (_) | (_| | |_) | (_| | |  |   <
 |_|  \___/ \___/ \__,_|_.__/ \__,_|_|  |_|\_\

A personal BBS  ·  Missoula, Montana  ·  formerly NaClCON BBS

Connect from your terminal: telnet naclconbbs.net 23  |  ssh naclconbbs.net -p 2222

  • webv4/sidebar/003-systemStats.xjs

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Aug 17 02:07:18 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/101d30166940f08b40929f64
    Modified Files:
    webv4/sidebar/003-systemStats.xjs
    Log Message:
    webv4: read each system.stats property once per page render

    system.stats.total_users, .total_messages and .total_files are computed
    from disk on every property read: they enumerate the user base, every
    message base, and every file base respectively. Only the stats backed by
    the stats file are cached (286b4c4cd0, nurse-3-film, 2026-01-04) - these
    three sit outside that cache, since nothing persists or increments them.

    The System Info sidebar read each of them twice. hide_empty_stats
    defaults to true, so a guard of the form

    !settings.hide_empty_stats || system.stats.total_files

    cannot short-circuit: the guard evaluates the property to decide whether
    the row is worth showing, and then the row body evaluates it again to
    print it.

    Snapshot the properties into a local object and render from that. As a
    side effect the table becomes internally consistent, where previously
    each value could be read at a different moment.

    On a system with 144 sub-boards and 1,404 file directories, dropping the duplicate reads takes the front page from 18s to 9s when the data
    directory is reached over SMB.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net