Skip to content

perf(json): cell popover, long-line restyle and harness items left from #4427 #4442

Open

Description

@datlechin

Follow-up to #4427 (perf audit, json-views lane). Items left out of that PR:

  • JV1 (16a), long values in the cell popover. Wrapping every value (D1) was built, measured and reverted: a 1 MiB cell went from 202 to 252 MB and 41.1 G to 173 to 180 MB and 45.9 G, editable or read only. A sample shows TextKit 2 keeps the 1 MB paragraph as one layout fragment: at open NSTextView builds selection layers over the whole value (0.7 to 1.5 s of main) and each draw walks every line of the fragment (0.55 to 0.83 s a pass). Wrapping touches neither. The fix needs another approach (split the paragraph, or a caret instead of select-all past a size, which is a product call).
  • JV3 (2c), restyle a long line without typesetting it again. Gate is quiet pass 2: Typesetter.typeset more than once a step and over 150 ms.
  • ml8.json1mb.rowstep after perf(editor): lay out only the first screen of a long script and keep typing cost flat #4428 and perf(json): indent large JSON, wrap long lines faster, cancel stale JSON renders #4427: 225 to 251 ms main (bar 250 ms) and 7.3 G (bar 5 G), down from 3.45 to 3.72 s and 61 G. Most of the rest is the highlighter parsing the 1.5 MB indented text off main. Re-check in quiet pass 2.
  • bench_jsontoken fixture and its inspector row step (JV2 in the app): not added. JV2 was measured with the wrapline micro only (1 MiB hex token at 27 columns: 36.5 G to 1.37 G).
  • JV6 "two quick page turns on 50,000 rows under 1.3x one": not run, the suite has no such step. The cancellation is pinned by tests.
  • Popover Up and Down leave the cell from the middle of a wrapped paragraph: CellEditorArrowExit counts line breaks, not visual lines (I would like the up and down arrow keys to move the field being edited to the row above or below #2569). Values from 257 to 65,536 characters do this today. Found in review, not changed.

Quiet pass 2 results will be added here.

Activity

  1. added
    enhancement
    platform-macos
    on Nov 23, 2026
  2. datlechin commented on Nov 24, 2026

    @datlechin
    MemberAuthor

    Quiet pass 2: JV3 PASS, build it. 1 MB one-line INSERT, word wrap on: the long line is typeset 2 times a step (CTTypesetter) and a step costs 164 ms main (n=4, load not quiet; gate is more than once and over 150 ms).

  3. datlechin commented on Nov 24, 2026

    @datlechin
    MemberAuthor

    JV3 shipped in #4475.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions