• docs/v322_new.md webv4/lib/forum.js

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wednesday, November 11, 2026 13:55:44
    https://gitlab.synchro.net/main/sbbs/-/commit/c5f0ca87d9b659dae178b1ad
    Modified Files:
    docs/v322_new.md webv4/lib/forum.js
    Log Message:
    webv4: list a user's mail from one index read, not a lookup per number

    get_mail_headers() and getMailHeaders() called MsgBase.get_msg_header()
    for every message number from first_msg to last_msg. On a mail base
    whose numbers are sparse that is far more lookups than messages, and
    each one is a locked index search plus a header read.

    Symptom: the mail page (000-mail.xjs) on vert.synchro.net took 5 min
    51 s to load for a logged-in user. The mail base held 9,262 messages
    numbered 727309-752178, so 24,870 lookups at about 8.6 ms each over
    an SMB share, 15,608 of them for numbers that no longer exist.

    Read the index once with MsgBase.get_index(), keep the records to or
    from the user, and read only those headers (926 here), by index
    offset. The same call now takes 2.3 s. The header's to_ext/from_ext
    are still what decide the listing, so the results are unchanged.

    The per-number loops have been there since webv4 was imported into
    this repository in 3f16cac564 (2020-09-07).

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

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