Skip to content

3.0: make every layout path exact and remove the 2.x compatibility fallbacks #688

Open

Description

@Tim81

3.0 makes every layout path exact and closes the measured cost gaps that 2.x keeps for compatibility.

The 2.x rule (a document that saved keeps saving with the same output unless a closed issue changes it; a refused one stays refused) forces compatibility devices into several v2.4 fixes. Each is temporary and is removed here, so that every element lays out correctly however it is reached:

Each device carries a code comment naming 3.0 and this issue. The PRs that add them list them under "Removed in 3.0".

Cost gaps measured in 2.x and left open, to close with exact techniques (caching keyed by what a result depends on, incremental updates, early cutoff):

  • Table decision on many groups that each widen an automatic column: allocation grows faster than linearly (1,000 groups allocate 6.5 times what 400 do).
  • A tagged table's layout cost grows quadratically with its page count (5,000 pages 24.5 s, 10,000 pages 102 s on 345a521).
  • TableRenderer rebuilds the row-span blocked set on every page (O(rows) per page).

Later PRs add to these lists.

Activity

  1. Tim81 commented on Nov 23, 2026

    @Tim81
    OwnerAuthor

    Added by #682 (ruled 2026-11-23: accept and document in 2.x, no exceptions in 3.0):

    • Caller renderers at the continuation limit. A caller's own IRenderer whose result depends on the area it is offered, or an element a caller's renderer holds, can flip between saving and failing at the continuation limit, or move, when an earlier list entry moves. Built-in elements are kept exact in 2.x by laying every list out the 2.3.3 way when an element after a list comes near the limit. 3.0 removes both the residual and that rule: with every layout path exact and non-compliant input refused (3.0: refuse input and files that do not comply with the ISO PDF rules #614), no element's verdict depends on which 2.x layout an earlier list took.

    The cost of #682's extra layout pass will be added here, with its measurement, when #682 merges.

  2. Tim81 commented on Nov 26, 2026

    @Tim81
    OwnerAuthor

    One more item for the list, from the v2.4 list work. ListIndentClampSkipped (207) exists only to report what a
    list's 2.x twin gave up: a clamp (#476) or a move (#685) it skipped. When the twin goes, 207 goes with it, along
    with its message's cause list and the scan before the first pass that decides it (DocumentRenderer.ScanLists).
    ListEntryPartDropped (208) is reviewed at the same time: it reports an entry the twin placed without moving it,
    and an entry that fits no page, which 3.0 still has to answer.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions