Skip to content

/__worklist ships full text diffs of large build artifacts, crushing iframe performance #202

Description

@judell

Summary

/__worklist computes the full text diff of every file in each item and includes it in the response. When an item's files contains a large build artifact — e.g. a vendored app/vendor/xmlui-standalone.umd.js (~6 MB minified) plus its .map (~15 MB) — the resulting per-item diff is tens of megabytes, and the whole /__worklist payload is shipped to and parsed by the iframe on every worklist refetch. This is a severe, constant main-thread crush (typing/whisper/everything lags).

Evidence

With two items each carrying the vendored bundle, observed item diff sizes:

  • auto-scroll-chat-pane: 41,547,118 chars (~41.5 MB)
  • iterate-xmlui-numeric-error: 9,859,837 chars (~9.8 MB)
  • total /__worklist payload: ~51 MB

Removing the bundle/.map from the items' files dropped the same item diffs to 13.6 KB and 114 KB (total payload 139 KB) and immediately resolved the lag. The Inspector showed data:bind List "1 -> 279 items" in DiffView re-binding off the first 20 KB slice of the 41.5 MB string.

Fix

The diff machinery in /__worklist should cap or skip diffs for large/binary files:

  • Skip text-diffing files above a size threshold (e.g. a few hundred KB) and/or detected as minified/binary; surface "<path> changed (N bytes)" instead.
  • This lets build artifacts remain in an item's files (so the commit includes them) without ever shipping a multi-MB text diff to the iframe.

Workaround (in place)

The vendored bundle + .map were removed from the two items' files, eliminating the huge diffs. (Their commit is handled separately.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions