Skip to content

Reduce selection history writes on current runloop#1382

Merged
cyanzhong merged 1 commit intomainfrom
develop
Apr 19, 2026
Merged

Reduce selection history writes on current runloop#1382
cyanzhong merged 1 commit intomainfrom
develop

Conversation

@cyanzhong
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce immediate (synchronous) selection-history persistence work by deferring some EditorHistory.selectionRanges updates to an async task.

Changes:

  • Defer “touch lastAccessed” updates in selectionRange(for:fileSize:) using Task { ... }.
  • Defer removals in discard(for:) using Task { ... }.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MarkEditMac/Sources/Editor/EditorSelectionHistory.swift
Comment thread MarkEditMac/Sources/Editor/EditorSelectionHistory.swift
@cyanzhong cyanzhong merged commit df5e2d3 into main Apr 19, 2026
5 checks passed
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.

2 participants