Skip to content

chore: version packages - #1070

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

chore: version packages#1070
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

loro.js@0.2.0

Minor Changes

  • 880028d: Store text operations in shared range-backed buffers, read visible spans without
    allocating scalar views, and add lazy line navigation plus explicit text compaction.

loro-crdt@1.14.2

Patch Changes

  • 4d3d3f1: Shallow snapshot export no longer leaks the values of rich-text marks whose
    whole range was deleted before the shallow root.

    Deleting styled text removes the characters but keeps the style anchors, and the
    shallow-root state encoding shipped each anchor's value verbatim — so a mark
    value (e.g. an inline comment) that every read API already reported as gone
    still appeared in the exported bytes, defeating the documented content-redaction
    use of shallow snapshots. Dead style pairs now have their values nulled during
    export (anchors stay, so positions and replay are unaffected). Styles that only
    become dead after the shallow root keep their values so historical checkouts
    render correctly, and styles configured with expand: "both" are kept because
    an empty both-expand pair still applies to future inserts. Re-exporting a
    shallow snapshot produced by an older version also cleans it.

  • 4837d07: Fix unbounded degradation when re-asserting identical text marks over styled ranges.

    mark already tried to skip no-op marks, but the check used
    StyleRangeMap::get_styles_of_range, which returns None whenever the marked
    range spans more than one style-range leaf. On any document whose style ranges
    are already fragmented (i.e. any document with styles), re-asserting an
    identical mark recorded a new op every time.

    Each redundant mark leaves a pair of style anchors in the container state
    forever — they survive snapshots and are never consolidated — and every styled
    read walks all of them. Callers that re-assert marks (for example editor
    bindings syncing mark state) therefore permanently degraded styled reads without
    bound: reading a 724-character paragraph went from ~5µs to ~4ms after 1000
    redundant marks.

    The skip path now falls back to StyleRangeMap::range_has_key_value, which
    scans every style range covering the mark and reports whether each position
    already resolves the key to the given value. Attached and detached texts both
    use the new path when the single-leaf fast path cannot answer.

  • f4e011f: Fix an O(n^2) slowdown when reading styled text.

    Building the per-range style metadata for toDelta / getRichtextValue (and
    the sliced variants used to emit text events) deep-copied the whole Styles
    map once per style range. Each key in that map owns the set of every style op
    covering the range, while the resulting StyleMeta keeps only the LWW winner,
    so the copy scaled with the number of marks accumulated on the container and
    then discarded all but one element of it — O(marks) per range across O(marks)
    ranges. The conversion now borrows instead of cloning.

    Style anchors are never consolidated, so marks accumulate in the container
    state and every styled read paid for all of them. On a 724-character paragraph
    carrying 2000 accumulated marks, a styled read drops from ~103ms to ~1ms; a
    simulated editor binding that re-asserts marks on each keystroke drops from
    ~5ms to ~200us per read after 500 keystrokes.

loro-crdt-map@1.14.2

Patch Changes

  • 4837d07: Fix unbounded degradation when re-asserting identical text marks over styled ranges.

    mark already tried to skip no-op marks, but the check used
    StyleRangeMap::get_styles_of_range, which returns None whenever the marked
    range spans more than one style-range leaf. On any document whose style ranges
    are already fragmented (i.e. any document with styles), re-asserting an
    identical mark recorded a new op every time.

    Each redundant mark leaves a pair of style anchors in the container state
    forever — they survive snapshots and are never consolidated — and every styled
    read walks all of them. Callers that re-assert marks (for example editor
    bindings syncing mark state) therefore permanently degraded styled reads without
    bound: reading a 724-character paragraph went from ~5µs to ~4ms after 1000
    redundant marks.

    The skip path now falls back to StyleRangeMap::range_has_key_value, which
    scans every style range covering the mark and reports whether each position
    already resolves the key to the given value. Attached and detached texts both
    use the new path when the single-leaf fast path cannot answer.

  • f4e011f: Fix an O(n^2) slowdown when reading styled text.

    Building the per-range style metadata for toDelta / getRichtextValue (and
    the sliced variants used to emit text events) deep-copied the whole Styles
    map once per style range. Each key in that map owns the set of every style op
    covering the range, while the resulting StyleMeta keeps only the LWW winner,
    so the copy scaled with the number of marks accumulated on the container and
    then discarded all but one element of it — O(marks) per range across O(marks)
    ranges. The conversion now borrows instead of cloning.

    Style anchors are never consolidated, so marks accumulate in the container
    state and every styled read paid for all of them. On a 724-character paragraph
    carrying 2000 accumulated marks, a styled read drops from ~103ms to ~1ms; a
    simulated editor binding that re-asserts marks on each keystroke drops from
    ~5ms to ~200us per read after 500 keystrokes.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from a04e230 to ff2cd33 Compare August 11, 2026 08:03
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from ff2cd33 to 2faf140 Compare August 11, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants